GNOME Bugzilla – Bug 756754
Unset "current pointer emulating touch sequence" lazily
Last modified: 2015-12-04 10:50:13 UTC
It is currently unset when receiving CLUTTER_TOUCH_END on meta_display_handle_event(), however there's still Clutter event processing left that may result in checks for the current sequence being "pointer emulating". This makes those checks fail on CLUTTER_TOUCH_END in gnome-shell (which there are in the patches in bug #756748). I'm attaching a patch that unsets this lazily, since we don't have a way to hook post-processing.
Created attachment 313544 [details] [review] core: Unset "pointer emulating" sequence lazily Unsetting it in meta_display_handle_event() will make the pointer emulation checks fail on TOUCH_END event handlers across clutter actors, the sequence should still be considered as pointer emulating at that time. As we don't have a way to hook this post clutter event handling, instead unset/reset it lazily on the next pointer emulating TOUCH_BEGIN event, the checks would already fail on other sequences, even if the pointer emulating touch ended earlier. The only extra thing we need to take care about is sequence collision, at which point it's safe to just unset the stored sequence if its new incarnation isn't flagged/ deemed as pointer emulating.
Pushed with minor modifications and extra comments. Attachment 313544 [details] pushed as 96b5042 - core: Unset "pointer emulating" sequence lazily