From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Jacky Li <drsl@drshapeless.com>
Cc: 58245@debbugs.gnu.org
Subject: bug#58245: 29.0.50; other-frame is broken in EXWM
Date: Sun, 02 Oct 2022 20:31:30 +0800 [thread overview]
Message-ID: <878rly4db1.fsf@yahoo.com> (raw)
In-Reply-To: <87o7uuc1bb.fsf@drshapeless.com> (Jacky Li's message of "Sun, 02 Oct 2022 12:11:04 +0800")
Jacky Li <drsl@drshapeless.com> 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.
next prev parent reply other threads:[~2022-10-02 12:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-02 4:11 bug#58245: 29.0.50; other-frame is broken in EXWM Jacky Li via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-02 12:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-10-02 12:43 ` Lars Ingebrigtsen
2022-10-02 14:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-04 23:23 ` Adrián Medraño Calvo
2022-11-12 21:11 ` bug#58245: bug#58438: 29.0.50; EXWM focus lost Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rly4db1.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=58245@debbugs.gnu.org \
--cc=drsl@drshapeless.com \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.