Receiving EnterNotify event that should be prohibited by event mask

Rouslan Korneychuk rouslank at msn.com
Sun Dec 6 23:28:21 PST 2015


From: Peter Hutterer <peter.hutterer at who-t.net>
Sent: December 7, 2015 1:52 AM
To: Rouslan Korneychuk
Cc: xorg at lists.x.org
Subject: Re: Receiving EnterNotify event that should be prohibited by event mask

>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.

Sure. I'll do it in the evening.



More information about the xorg mailing list