NotifyGrab

Samuel Thibault samuel.thibault at ens-lyon.org
Fri Nov 24 11:04:27 UTC 2017


Samuel Thibault, on ven. 24 nov. 2017 11:55:49 +0100, wrote:
> Jasper St. Pierre, on jeu. 23 nov. 2017 14:31:32 -0800, wrote:
> > Selecting for XI2 events will disable core input events from being sent to your
> > client.
> 
> I forgot to mention: I'm not getting these focus events in Compiz even
> without selecting for XI2, and selecting for XI2 focus events does not
> bring XI_FocusIn/Out events either.

I mean, I do get XI_FocusIn/Out events, but not at the moment when the
application calls XGrabKeyboard(), and not even when the application
receives a KeyPress event (and Compiz too since it receives it via XI2,
that's precisely the problem: it needs to know that this KeyPress
happened while grabbing was in effect).

Samuel

> Samuel
> 
> > On Thu, Nov 23, 2017 at 8:37 AM, Samuel Thibault <[1]
> > 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 [2]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
> >     _______________________________________________
> >     [3]xorg-devel at lists.x.org: X.Org development
> >     Archives: [4]http://lists.x.org/archives/xorg-devel
> >     Info: [5]https://lists.x.org/mailman/listinfo/xorg-devel
> > 
> > 
> > 
> > 
> > --
> >   Jasper
> > 
> > References:
> > 
> > [1] mailto:samuel.thibault at ens-lyon.org
> > [2] https://tronche.com/gui/x/xlib/input/XGrabKeyboard.html
> > [3] mailto:xorg-devel at lists.x.org
> > [4] http://lists.x.org/archives/xorg-devel
> > [5] https://lists.x.org/mailman/listinfo/xorg-devel
> 
> > _______________________________________________
> > 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
> 
> 
> -- 
> Samuel
>  J'ai un gros problème: j'ai cet exercice à rendre demain lundi, mais ma
>  TI 89 ne sait pas le faire...
>  Est-ce que quelqu'un pourrait m'aider??
>  -+- OD In Guide du Neuneu Usenet : Comment ça ! Il faut réfléchir ?-+-

-- 
Samuel
<B> l'alim je sais où elle est, elle est juste à côté de la dame qui dort
<g> B: clairement faut revoir les priorités dans la vie
<g> B: une dame ça se retrouve, un uptime...


More information about the xorg-devel mailing list