NotifyGrab
Jasper St. Pierre
jstpierre at mecheye.net
Thu Nov 23 22:31:32 UTC 2017
Hi,
Selecting for XI2 events will disable core input events from being sent to
your client. This is to prevent XI2-enabled clients from getting duplicate
events and not knowing which to filter out. You need to select for
XI_FocusIn / XI_FocusOut events instead of using the core input events.
On Thu, Nov 23, 2017 at 8:37 AM, Samuel Thibault <
samuel.thibault at ens-lyon.org> wrote:
> Hello,
>
> I'm working on making compiz use XI2 to get more fine-grain hold
> on keypresses. I'm however getting an issue: I do not always get
> NotifyGrab FocusIn events from the root window when a client calls
>
> XGrabKeyboard (mydisplay, mywindow, True, GrabModeAsync, GrabModeAsync,
> CurrentTime);
>
> , which prevents from properly respecting grabbing.
>
>
> Unfortunately, I didn't manage to reproduce the issue with a simpler X
> root event listener: runnning
>
> XSelectInput(mydisplay, DefaultRootWindow(mydisplay), FocusChangeMask);
>
> does properly bring focus out/in NotifyGrab events, but these events
> don't get to Compiz. I also tried to listen on the window itself with
> the same result: my simple event listener gets the event, but Compiz
> does not.
>
> Oddly enough, this seems to depend on the application: kvm / virtualbox
> grabbing have the issue, but vncviewer grabbing doesn't have the issue.
>
> Reading https://tronche.com/gui/x/xlib/input/XGrabKeyboard.html tells me
> that there should always be FocusIn / FocusOut events being generated,
> so I don't immediately see where to look for in the differences between
> by simple listener and Compiz.
>
> Could there be some undocumented cases where such events are not
> generated? Any idea where I could look in the X server to check what is
> happening?
>
> Samuel
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
--
Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20171123/f3531c71/attachment.html>
More information about the xorg-devel
mailing list