Receiving EnterNotify event that should be prohibited by event mask
Peter Hutterer
peter.hutterer at who-t.net
Sun Dec 6 22:52:02 PST 2015
On Sun, Dec 06, 2015 at 05:36:27AM +0000, Rouslan Korneychuk wrote:
> Forgive me if this is not the right place to ask this.
>
> I have a program with a single window that uses XInput2 for mouse input.
> I set the event_mask field of the XSetWindowAttributes struct to
> "ExposureMask | StructureNotifyMask | KeymapStateMask | KeyPressMask |
> KeyReleaseMask", so I expect to not receive any EnterNotify or LeaveNotify
> events, yet if I press and hold a mouse button on my window, move the
> cursor out of the window and then back into the window, I get an
> EnterNotify event (the only reason the program even listens for these
> events is for compatibility with operating systems that don't have
> XInput2). I only get EnterNotify events, not LeaveNotify, and I only get
> them while holding a mouse button down. Curiously, this behaviour goes
> away if I call XIGrabDevice in response to a button press.
>
> My question is: why does this happen? This looks like a bug and this issue
> is trivial to work around (I only even noticed because of an "assert"
> statement I added), but I want to make sure this isn't caused by me doing
> something wrong.
no, this sounds like a bug. any chance you can extract a simple test program
from this? if so, please file a bug, assign it to me and attach the program.
Cheers,
Peter
More information about the xorg
mailing list