After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732234 - Touch events may leave a stage-less device, or happen on one
Touch events may leave a stage-less device, or happen on one
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: x11
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-06-25 15:39 UTC by Carlos Garnacho
Modified: 2014-06-25 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
input-device: Do not unset the device stage after the last touch is lifted (1.12 KB, patch)
2014-06-25 15:40 UTC, Carlos Garnacho
committed Details | Review
x11: Set the input device stage on XI_TouchBegin, if not already set (1.65 KB, patch)
2014-06-25 15:40 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2014-06-25 15:39:19 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.
Comment 1 Carlos Garnacho 2014-06-25 15:40:32 UTC
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.
Comment 2 Carlos Garnacho 2014-06-25 15:40:38 UTC
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.
Comment 3 Emmanuele Bassi (:ebassi) 2014-06-25 15:49:52 UTC
Review of attachment 279230 [details] [review]:

okay.
Comment 4 Emmanuele Bassi (:ebassi) 2014-06-25 15:54:25 UTC
Review of attachment 279231 [details] [review]:

looks good.
Comment 5 Emmanuele Bassi (:ebassi) 2014-06-25 16:12:05 UTC
pushed, will be in 1.19.4