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 683431 - PanAction::pan-stopped sometimes is emitted before ::gesture-begin
PanAction::pan-stopped sometimes is emitted before ::gesture-begin
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterAction
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-09-05 15:38 UTC by Emanuele Aina
Modified: 2012-09-06 11:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gesture-action: add gesture_prepare() virtual function (2.97 KB, patch)
2012-09-05 15:39 UTC, Emanuele Aina
committed Details | Review
pan-action: emit ::pan-stopped before ::gesture-begin (2.10 KB, patch)
2012-09-05 15:41 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2012-09-05 15:38:01 UTC
If a new gesture starts before the momentum of the previous one has finished, users get their ::pan-stopped signal handlers called after the handlers for the ::gesture-begin associated to the next gesture.

This is due to ::pan-stopped being emitted in the class default handler of the ::gesture-begin signal.

We can add a gesture_prepare() virtual function that gets called before emitting ::gesture-begin to let GestureAction subclasses to reset their state.
Comment 1 Emanuele Aina 2012-09-05 15:39:05 UTC
Created attachment 223554 [details] [review]
gesture-action: add gesture_prepare() virtual function

The gesture_prepare() virtual function is called before the
::gesture-begin signal is emitted, and allows a subclass to reset
its state.
Comment 2 Emanuele Aina 2012-09-05 15:41:03 UTC
Created attachment 223555 [details] [review]
pan-action: emit ::pan-stopped before ::gesture-begin

When starting a new gesture before the momentum of the previous one
has finished the ::pan-stopped was counter-intuitively emitted
after the new ::gesture-begin.

Make use of gesture_prepare() to reset the state of the action
right before emitting ::gesture-begin.
Comment 3 Emmanuele Bassi (:ebassi) 2012-09-05 15:47:24 UTC
Review of attachment 223554 [details] [review]:

looks good. we'll have to properly document the state machine, but for now it's fine.
Comment 4 Emmanuele Bassi (:ebassi) 2012-09-05 15:47:51 UTC
Review of attachment 223555 [details] [review]:

looks good.
Comment 5 Emmanuele Bassi (:ebassi) 2012-09-06 11:19:19 UTC
Attachment 223554 [details] pushed as 2001cd7 - gesture-action: add gesture_prepare() virtual function
Attachment 223555 [details] pushed as 3b298dd - pan-action: emit ::pan-stopped before ::gesture-begin