GNU bug report logs - #66765
30.0.50; Building emacs with xinput2 breaks receiving XSendEvent events

Previous Next

Package: emacs;

Reported by: Ami Fischman <ami <at> fischman.org>

Date: Thu, 26 Oct 2023 17:51:02 UTC

Severity: normal

Tags: notabug, wontfix

Found in version 30.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


Message #12 received at 66765-done <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ami Fischman <ami <at> fischman.org>
Cc: 66765-done <at> debbugs.gnu.org
Subject: Re: bug#66765: 30.0.50; Building emacs with xinput2 breaks
 receiving XSendEvent events
Date: Fri, 27 Oct 2023 08:32:44 +0800
tags 66765 + notabug wontfix
thanks

Ami Fischman <ami <at> fischman.org> writes:

> 1. Run: `emacs -Q` on an X11 display for a binary that's been built
> with (the default) `--with-xinput2`
> 2. From another program, trigger an XSendEvent targeting the above
> emacs' window sending a key event.
> Expected:
> 3. The sent key event is seen by emacs.
> Actual:
> 4. Emacs doesn't seem to receive the sent key event.
>
> Simplest way to execute step 2 above is:
> $ git clone http://github.com/epitron/xse.git
> $ cd xse && ./configure  && xmkmf && make depend && make
> $ xwininfo
> (click the emacs window and note its reported "Window id" for the next command)
> $ ./xse -win <EMACS_WINDOW_ID> -Debug '<Key>l'
>
> When emacs is built with `--without-xinput2` the issue is gone, and
> sent events are received properly.
> Issue is not present in 27.1 or 28.1, but is present in 29.1 and HEAD.
> Confirmed with a git bisect that the issue showed up when xinput2 was
> enabled by default in
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0105a4ddb8a58146f3fc71c265e57291c873af0b
>
> I stumbled across this issue when upgrading from 27.1 to 29.1 and
> noticing that ratpoison can no longer send its escape key (in my case,
> this is C-a) to emacs, even though it has no problems sending the same
> key to every other app on my system.

When the X input extension is in use, both Emacs and the X server ignore
core events.  It's also impossible to send extension events, so this
extension renders external event delivery effectively impossible.

This isn't a bug we can fix, sorry; but the XTEST extension is capable
of simulating real key presses, so I suggest whatever tools send Emacs
events be rewritten to make use of that extension.

The same issue can be observed in programs written to use version 3 or 4
of the GTK toolkit.




This bug report was last modified 1 year and 259 days ago.

Previous Next


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