unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: 58438@debbugs.gnu.org
Subject: bug#58438: 29.0.50; EXWM focus lost
Date: Wed, 12 Oct 2022 08:52:00 +0800	[thread overview]
Message-ID: <87czaxhnin.fsf@yahoo.com> (raw)
In-Reply-To: <87sfjuwkxz.fsf@elite.giraud> (Manuel Giraud's message of "Tue, 11 Oct 2022 15:26:16 +0200")

forcemerge 58438 58245
thanks

Manuel Giraud <manuel@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.





  reply	other threads:[~2022-10-12  0:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 13:26 bug#58438: 29.0.50; EXWM focus lost Manuel Giraud
2022-10-12  0:52 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-10-12  7:08   ` Manuel Giraud
2022-10-12  8:56   ` Manuel Giraud

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czaxhnin.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=58438@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=manuel@ledu-giraud.fr \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).