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#58245: 29.0.50; other-frame is broken in EXWM Date: Sun, 02 Oct 2022 20:31:30 +0800 Message-ID: <878rly4db1.fsf@yahoo.com> References: <87o7uuc1bb.fsf@drshapeless.com> 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="30990"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 58245@debbugs.gnu.org To: Jacky Li Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 02 14:32:22 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 1oey8s-0007tr-Nn for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Oct 2022 14:32:22 +0200 Original-Received: from localhost ([::1]:56126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oey8r-0002AG-QS for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Oct 2022 08:32:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oey8a-00028S-Jy for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 08:32:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47356) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oey8Y-00055B-LP for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 08:32:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oey8Y-0004r9-8M for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 08:32: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: Sun, 02 Oct 2022 12:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58245 X-GNU-PR-Package: emacs Original-Received: via spool by 58245-submit@debbugs.gnu.org id=B58245.166471391118650 (code B ref 58245); Sun, 02 Oct 2022 12:32:02 +0000 Original-Received: (at 58245) by debbugs.gnu.org; 2 Oct 2022 12:31:51 +0000 Original-Received: from localhost ([127.0.0.1]:46434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oey8M-0004qk-JP for submit@debbugs.gnu.org; Sun, 02 Oct 2022 08:31:50 -0400 Original-Received: from sonic316-20.consmr.mail.ne1.yahoo.com ([66.163.187.146]:41884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oey8K-0004qV-GA for 58245@debbugs.gnu.org; Sun, 02 Oct 2022 08:31:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664713901; bh=GKpY4ZnpC7Djx8NFEV7TRxw+DsrDgcavOtRCSfZIt7s=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=PdawP76/ehpJeqmn8zFpUFvToqe6oVuSRam2n962p/Q7jd/LPxtQptjDQAxaZ+Huv2BfYwVrzx5VDnStMIS/EWxy8qkBNvhGzVe8sxVTi2beMaSsco8jYgdPe7KFWLq7NqiXZpmXVJIHglIj81MntYo2LUfzvgB1yclXfE1R+BtMmZgWGKmmFJZ9TtirFHhL3TR/RH+d5bHQloaV4Phqt1+X05Vi5tmeu9IE3caL1tMLS3KWUzwyw7icZHELS8oWv/1gVWmfpxln1pjGEO7u1ymNn0EqkmJBhAnJIfxHDnfFqp69EeaAfu8ghoHnfl61sXlJQ6nD5/+uprwyMN8IYw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664713901; bh=HBNAfL8ruFVLHOo40242TCSvTRvcCimrbZG4VI9pSc5=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=BuEqDGbb6Wmu5fNxcHkU5lWXSD8Pg5GMQaGJalnG49/YB1YV982HEupUPuWVXZcGUhl1h1IU7tVqWIiG486obRsJGG2qlkERAiuGPgD0PRYoS1Sh6R9joVJLl9JJxlztbshdP43EPP+SZ1q7g2OjV86O6oER8MDGlRMwdgE7vIvV8BCyD5li75goIIlRXQCL+PebbTaumaVdzmXJV50xMqjT0Ks4zgtd+TFSINtmdDhTvFbzSanPbayG+wlVPY66ow2wvWrrpOrCnOLpHFX8z8gYdFbHnO2g4eZZYBuup6xQVyAUaYwEvefJUbq2xes8om7N66uGVKU0dUymE0RoFg== X-YMail-OSG: 6fc4oP8VM1mZHZJg1fXm90fZZe5Jy56MCTuQynVatzEAsHbrWtgGk18.13XFvbx SQ6DUh5644JU5TWVMZh5aBf5dp0W2TEDxmdd1E25evXp3LOBfJNbw_kfJrpFSBnQIls5VcOhKhmQ Cq7121N.wp.ergY2fNIUZ5XDJ_lXYQB8_eFWFZWwvuhCJSoZkV4POqMfle0VEkFDVfXw3nBmyqlo 7OfbaQ0B5Xp6PkS_RdWb2rqjnccc5Mky5gY340Zy9fubAe44lnASdklg6Y0OaEPhSZbYXpgUp9Zt 0umwcMXaJeMbjdQP4rHwJIvtUl19uCBx9VJfl4uf7yWn.rdxCJIXx4fXX6nBKU1tQKfuFlIYKIG1 waDpBzi6tNYw2pL3mAinaOtEEpsZsA_AfGPxZACuyHEDAWRSxHResO_d3l.XUH_qewr6dDSN2hhl OcDEJjTE4vigIQUYv9C.ZvnuiWPjTx0oDPifOqn4lAQujE27pFSkTksoDjxX.FLTj7fbSlr0kvH1 r3gw0JElMIjzH.Oe1vs9H3ZIyMCI623XAx28P3.fsjBsyVfqGFeiRMd3qMvk6sok2WDlWdo8126F hXLGSDkbssGlOTYoZJ1AN95C8VT31ELN1A0gNeCXR8xGYrP7.znrhcss_5pUQ1e53WogDgFK82Me L6ufr3lmEI3h2V6.AUF8dbzI3oL.j0zwGXUKL1JOL2Q3fqKAf6LG.a2ic1cjpEFfEUpwu53vDpxY hexVXtNKecBl91hQFVMEUyF3BbaAaRz.ccuyZNQFboOAaOOIFH6mhh1fq62o9eRWF9gUzxYTybcV wwQ0RppdPMPOrhRxcU.fplzhXO3eZoc6xuhRSw4OoJ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Sun, 2 Oct 2022 12:31:41 +0000 Original-Received: by hermes--production-sg3-cf9dc7f8d-ss2cs (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d4de82a5b359ee92da420e5fa303ee54; Sun, 02 Oct 2022 12:31:36 +0000 (UTC) In-Reply-To: <87o7uuc1bb.fsf@drshapeless.com> (Jacky Li's message of "Sun, 02 Oct 2022 12:11:04 +0800") X-Mailer: WebService/1.1.20702 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:244211 Archived-At: Jacky Li writes: > I am using EXWM with dual monitors. When I call (other-frame), I can see > the modeline is activated on the other frame, but the cursor does not > follow. Any interactive functions would be called in the original > frame. The cursor now only follows my mouse, but I am sure that > focus-follow-mouse is nil and mouse-autoselect-window is nil. > > I believe the broken commit is within the previous 24 hours. And I > highly suspect commit 3924fbd025 is the root of the bug. I believe this is a bug with EXWM, from reading its code: ((= type xcb:Atom:_NET_ACTIVE_WINDOW) (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))))))) Since it acts as a window manager, it must either set `x-no-window-manager' to t, or really focus Emacs frames (which don't have corresponding EXWM buffers) by doing the X protocol to transfer the focus to the frame. 3924fbd025 is not buggy; EXWM enables support for _NET_ACTIVE_WINDOW, which Emacs expects to be implemented correctly: Activation In the X world, activating a window means to give it the input ^^^^^^^^^^^^^^^^^ focus. This may not be possible if the window is unmapped, ^^^^^ because it is on a different desktop. Thus, activating a window may involve additional steps like moving it to the current desktop (or changing to the desktop the window is on), deiconifying it or raising it.