GNOME Bugzilla – Bug 732234
Touch events may leave a stage-less device, or happen on one
Last modified: 2014-06-25 16:12:28 UTC
On X11, I've seen two situations where clutter is left with a NULL stage on the input device, causing events to be ignored: - When the last touch is lifted, the stage is cleared from the device. However, the pointer will likely stay within the stage, dragged by the pointer emulating sequence. - On the opposite, if the stage operates exclusively on touch sequences that don't carry pointer emulation, there won't be accompanying Enter/Leave events, so the device will be left stage-less for the touch operation. I'm attaching 2 patches to fix those.
Created attachment 279230 [details] [review] input-device: Do not unset the device stage after the last touch is lifted On X11 the pointer will follow a "pointer emulating" touch sequence, so the pointer will be effectively left inside the stage after that touch is lifted, even though the master device stage is unset. This makes pointer events get ignored until the pointer leaves and enters again the stage.
Created attachment 279231 [details] [review] x11: Set the input device stage on XI_TouchBegin, if not already set Until now, touch events sort of rely on XI_Enter/XI_Leave events accompanying the pointer emulating touch in order to have a stage set on the device, These events won't happen though if it's not a pointer emulating touch which happens on the stage, causing touch events to be ignored. Fix this by ensuring that the input device has a stage on XI_TouchBegin itself, but only if it's not already set, so we don't possibly steal touch events to an already interacting stage.
Review of attachment 279230 [details] [review]: okay.
Review of attachment 279231 [details] [review]: looks good.
pushed, will be in 1.19.4