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 685554 - Assertion failure when trying to cancel an already started gesture
Assertion failure when trying to cancel an already started gesture
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterAction
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-05 11:33 UTC by Emanuele Aina
Modified: 2012-10-10 19:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gesture-action: Make _cancel() callable after the gesture has started (809 bytes, patch)
2012-10-05 11:33 UTC, Emanuele Aina
none Details | Review
gesture-action: Make _cancel() callable after the gesture has started (1.17 KB, patch)
2012-10-05 11:44 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2012-10-05 11:33:36 UTC
clutter_gesture_action_cancel() currently asserts that
`!action->priv->in_gesture' before cancelling the gesture. Given that we can
cancel an already started gesture from a callback by returning FALSE, I don't
see any reason why we can't explicitly cancel a gesture in any moment.

Relatedly, the ::gesture-cancel is emitted even if the gesture has not
passed the "prepare" state. Should I update the patch to prevent spurious
::gesture-cancel events?
Comment 1 Emanuele Aina 2012-10-05 11:33:38 UTC
Created attachment 225872 [details] [review]
gesture-action: Make _cancel() callable after the gesture has started
Comment 2 Emanuele Aina 2012-10-05 11:44:43 UTC
Created attachment 225874 [details] [review]
gesture-action: Make _cancel() callable after the gesture has started

Handle the corner-case where _cancel() is called during gesture_prepare().
It that's the case, do not emit the ::gesture-begin signal.
Comment 3 Emmanuele Bassi (:ebassi) 2012-10-10 14:17:49 UTC
Review of attachment 225874 [details] [review]:

looks good to me.

please, push to master and cherry-pick on the clutter-1.12 branch
Comment 4 Emanuele Aina 2012-10-10 19:14:01 UTC
Attachment 225874 [details] pushed as 1eaa577 - gesture-action: Make _cancel() callable after the gesture has started