XGrabButton

Riza Dindir riza.dindir at gmail.com
Thu Jul 27 13:52:30 UTC 2023


Hello Po,

Then it is much better to grab for buttons for each button/modifier
instead of  writing a generic grab
because the resending of events required a more elaborate processing
of the events.

Riza

On Thu, Jul 27, 2023 at 3:53 PM Po Lu <luangruo at yahoo.com> wrote:
>
> Riza Dindir <riza.dindir at gmail.com> writes:
>
> > Since the XGrabPointer call with AnyButton and AnyModifier does grab
> > for all modifiers and buttons, how should I make it propagate to the
> > window the button press event (without modifiers). I tried XSendEvent
> > to send the button press event to that window, but it did not respond.
> > The application does not operate as expected.
> >
> > It is perfectly ok for me to use 3 XGrabButton calls, but was
> > wondering why this would not work for a XGrabButton call with
> > AnyButton and AnyModifier parameters.
>
> The application in question might be using the X input extension and
> only responding to XI events, and you likely forgot to change the event
> window contained in the event before resending it to the application.
>
> It's generally a bad idea to intercept and ``resend'' events to other X
> clients, as you are required to translate the event coordinates
> yourself, and the recipients will see events arrive with their
> timestamps out-of-order.  Additionally, you will have to translate input
> extension events generated by both versions of the extension, and any
> generated by extensions that haven't yet been invented.


More information about the xorg mailing list