GNU bug report logs - #58245
29.0.50; other-frame is broken in EXWM

Previous Next

Package: emacs;

Reported by: Jacky Li <drsl <at> drshapeless.com>

Date: Sun, 2 Oct 2022 04:12:01 UTC

Severity: normal

Merged with 58438

Found in version 29.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at control <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 58438 <at> debbugs.gnu.org
Subject: Re: bug#58438: 29.0.50; EXWM focus lost
Date: Wed, 12 Oct 2022 08:52:00 +0800
forcemerge 58438 58245
thanks

Manuel Giraud <manuel <at> ledu-giraud.fr> 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.




This bug report was last modified 2 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.