From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58438: 29.0.50; EXWM focus lost Date: Wed, 12 Oct 2022 08:52:00 +0800 Message-ID: <87czaxhnin.fsf@yahoo.com> References: <87sfjuwkxz.fsf@elite.giraud> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3510"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 58438@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 12 02:53:36 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiQ07-0000jv-MH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Oct 2022 02:53:35 +0200 Original-Received: from localhost ([::1]:58568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiQ06-0000dp-7n for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Oct 2022 20:53:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiPza-0000c8-HD for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 20:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiPza-0003Vo-9V for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 20:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiPza-0002i8-53 for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 20:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Oct 2022 00:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58438 X-GNU-PR-Package: emacs Original-Received: via spool by 58438-submit@debbugs.gnu.org id=B58438.166553593910367 (code B ref 58438); Wed, 12 Oct 2022 00:53:02 +0000 Original-Received: (at 58438) by debbugs.gnu.org; 12 Oct 2022 00:52:19 +0000 Original-Received: from localhost ([127.0.0.1]:55168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiPyt-0002h8-EA for submit@debbugs.gnu.org; Tue, 11 Oct 2022 20:52:19 -0400 Original-Received: from sonic303-22.consmr.mail.ne1.yahoo.com ([66.163.188.148]:39146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiPyr-0002go-HU for 58438@debbugs.gnu.org; Tue, 11 Oct 2022 20:52:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1665535931; bh=AVwymvy/mtF6/W/MhU0jncpmjSGOr2v2w4smluum2eY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=FfohdiXliElOZgkCTS89mnt4irlsnT2Ja7GC3It+DnUA+xurFjv46Hi25tVRbJN3kgwP/bpQA0B9tzd+KWtPO/EbXAsWwKLW+rlS6eAcxGAk6DWFhcO3y1jbTlOcN/IboDCzcoZFJpo/rl6O6WU6pPkt0Y/PDZe+skNv8+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di4.g5sEhC.iybG4y7t_UjtFwACrCyIwI1xC5dkwjAj.sTv9SYacpZ Xs7ksiZDvRxakKZHYPIfFClCNSUiRLqw3ay8kwIJai7mpPE6x4f.N9I1Eqoy_IAbE7dtD9xAWJJ2 b..U1Du7wBiJX9FA5G5EWoaS1WYr3NtT6eHpE8eoZRPlOPRm2ljzWsiyAWpyLH7AYHGnLJU8Aahq uCFspkdTsMMkOy28K9biSSKYEN_RGW8CsXKGqT48HGS3xfIP53mIIkgyePGO85ONM20cpVpcEaCs zNKAj6qadN8nr6tG_2IODu7oP_VzdG7BTLT5R8uHU_5Le9.v1krQSeb_lK7WNGBV8Hru7b.qe1es rsKCDwAkONiIPM5XvzelKDHRTTZKjm02l0dpvqs_WtBL8e7K6hiFxKr3rUmJv4sewV9n9h.9v6IS 8wur81Raj9ULhbK8bcC7TU6WUy63uDzSTtSMeUSGPN X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Wed, 12 Oct 2022 00:52:11 +0000 Original-Received: by hermes--production-sg3-785466d859-8t5fd (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 16ea05fb8017ab523073b15abff5bd7c; Wed, 12 Oct 2022 00:52:05 +0000 (UTC) In-Reply-To: <87sfjuwkxz.fsf@elite.giraud> (Manuel Giraud's message of "Tue, 11 Oct 2022 15:26:16 +0200") X-Mailer: WebService/1.1.20740 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245157 Archived-At: forcemerge 58438 58245 thanks Manuel Giraud writes: > Hi, > > I'm using EXWM. Since this patch 3924fbd025, whenever I'm starting an > external graphical program (eg. Firefox), the cursor will stay hollow in > other Emacs buffers even when I switch to them. > > Do you think that EXWM is at fault here regarding EWMH? Yes; it must either set `x-no-window-manager' to a non-nil value, stop announcing support for _NET_ACTIVE_WINDOW, or implement said property correctly. At present, it assumes Emacs itself will never rely on said property to activate its frames, which is no longer true in Emacs 29. Please point the EXWM developers to this document: https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm46409506372544 And say that this part of exwm.el: ;; _NET_ACTIVE_WINDOW. ((= type xcb:Atom:_NET_ACTIVE_WINDOW) <==== add code after here (let ((buffer (exwm--id->buffer id)) iconic window) (when (buffer-live-p buffer) (with-current-buffer buffer (when (eq exwm--frame exwm-workspace--current) (if exwm--floating-frame (select-frame exwm--floating-frame) (setq iconic (exwm-layout--iconic-state-p)) (when iconic ;; State change: iconic => normal. (set-window-buffer (frame-selected-window exwm--frame) (current-buffer))) ;; Focus transfer. (setq window (get-buffer-window nil t)) (when (or iconic (not (eq window (selected-window)))) (select-window window)))))))) must loop through each frame on the display EXWM manages, and should the frame's `outer-window-id' match what is specified in the client message, call `x-focus-frame' on the frame with noactivate set to a non-nil value.