XI_Enter/XI_Leave coming from a slave

David Bokan bokan at chromium.org
Wed Jan 10 00:18:31 UTC 2018


Please bear with me as I'm utterly new to X - I'm trying to debug an issue
in Chromium when using xtest. I'm not sure if the bug is in Chromium, X, or
XTest or some combination of the three.

There's two things that are puzzling me:

1) When I click mouse button 1 on a physical device, it seems that there's
some kind of grab going on: I get an XI_Enter event with NotifyGrab and an
XI_Leave with NotifyUngrab. This kind of makes sense except that I've
disabled the explicit device grab (XIGrabDevice) and we don't have any
passive grabs that I can see. So where is this grab coming from? If I press
down and move the pointer out of the window I continue to see motion events.

I tried to make a simple app to repro but couldn't. Using XIGrabButton
doesn't cause XI_Enter/Leave events if the click is with in the window.
So...where could this behavior be coming from? Figuring out how to
reproduce this would help me debug the issue below.

2) This is the real issue I'm debugging. Given the above XI_Enter/Leave
behavior on mouse buttons, It seems that using xtest causes us to get an
extra pair of XI_Enter and XI_Leave events on a mouse down with deviceid ==
4 (xtest pointer) - in addition to the regular ones we get as described
above for the master pointer.

I can kind of repro this in a test app by using XIGrabButton on deviceid=4.
This causes me to get the crossing events with deviceid=4 but I don't get a
second pair for the master pointer.

Any idea what might be happening or advice on how to dig deeper? Anything I
could try (e.g. is there a way to clear all passive grabs?)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg/attachments/20180109/44be9a1b/attachment.html>

More information about the xorg mailing list