Subject: Re: bug#66765: 30.0.50; Building emacs with xinput2 breaks receiving XSendEvent events

From: Po Lu <[email-masked]>
Date: Fri, 27 Oct 2023 15:03:21 +0800

Eli Zaretskii <[email-masked]> writes:

> Can you please add something to etc/PROBLEMS about this issue?
>
> How widely is this mechanism used in the wild?  If it is used widely
> enough, perhaps we should tell people not to build with XInput2 if
> they have vested interests in those methods?

XSendEvent is seldom used to send input events these days, for this and
many other reasons, and teaching X programming is outside the purview of
PROBLEMS.  Properly written programs either insert events into the
server by means of the XTEST extension, or through OS interfaces that
precede the X server in the input event delivery process.

One such reason is that it's not possible for an X client to reliably
establish the window an event should be delivered to without grabbing
the server and reading every event mask in between the root window and
the window beneath the mouse pointer, which is slow, requires a server
grab, and tedious.

> Also, maybe submitting bug reports to the respective developers would
> cause them to improve the situation?

Oh no, this is a studious design choice, and one I agree with; it's not
possible to transform core events into input extension ones, because too
much information is absent from the former.