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 732907 - Allow for calling clutter_gesture_action_cancel() within the ::gesture-end handler
Allow for calling clutter_gesture_action_cancel() within the ::gesture-end ha...
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterAction
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-08 16:47 UTC by Carlos Garnacho
Modified: 2014-07-08 17:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gesture-action: Prepare for clutter_gesture_action_cancel() within ::gesture-end (1.42 KB, patch)
2014-07-08 16:48 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2014-07-08 16:47:55 UTC
TBH this is quite mutter specific, but there are situations there where gesture cancellation is wanted at once on ::gesture-end (mainly because the action triggered by gestures there may trigger a grab, so the gesture action will be missing CLUTTER_TOUCH_END events then).

Calling clutter_gesture_action_cancel() in that situation yields the expected result, but produces 2 critical warnings in the captured-event action handler, I'm attaching a patch to fix those.
Comment 1 Carlos Garnacho 2014-07-08 16:48:25 UTC
Created attachment 280171 [details] [review]
gesture-action: Prepare for clutter_gesture_action_cancel() within ::gesture-end

There may be odd situations where full gesture cancellation may be wanted at once
when the first touch is lifted and ::gesture-end is emitted on a gesture action.
Although calling clutter_gesture_action_cancel() within the ::gesture-end handler
causes 2 critical warnings that are otherwise harmless.
Comment 2 Emmanuele Bassi (:ebassi) 2014-07-08 17:29:23 UTC
Review of attachment 280171 [details] [review]:

looks okay, though I have to admit I never thought canceling a gesture inside the ::gesture-end handler. seems like closing the stable doors well after the horses have left.
Comment 3 Carlos Garnacho 2014-07-08 17:43:42 UTC
(In reply to comment #2)
> Review of attachment 280171 [details] [review]:
> 
> looks okay, though I have to admit I never thought canceling a gesture inside
> the ::gesture-end handler. seems like closing the stable doors well after the
> horses have left.

Yeah it's indeed odd :), mainly to circumvent strange X11 semantics wrt ongoing touch events and active pointer grabs, where the former are (not quite usefully...) muted, should be highly unlikely/unneeded in regular clients.
Comment 4 Carlos Garnacho 2014-07-08 17:54:34 UTC
Attachment 280171 [details] pushed as 8d669ab - gesture-action: Prepare for clutter_gesture_action_cancel() within ::gesture-end