summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2012-10-01 17:29:01 +0200
committerEmanuele Aina <emanuele.aina@collabora.com>2012-10-19 13:41:25 +0200
commitbd1febb2eaa73c2925785e3b5f5a7d7ab70d9692 (patch)
tree0b1d3ab7a7f90032677eda275699cf6e31414311
parentabcf1d589f29ba7914d5648bb9814ad26c13cd83 (diff)
downloadclutter-bd1febb2eaa73c2925785e3b5f5a7d7ab70d9692.tar.gz
gesture-action: Unregister all tracked points on cancel
Ensure that when cancelling a gesture, either because a callback has returned FALSE or because clutter_gesture_action_cancel() has been called, the array tracking touch points is emptied and a whole new set of touch points is needed before restarting the gesture. https://bugzilla.gnome.org/show_bug.cgi?id=685221
-rw-r--r--clutter/clutter-gesture-action.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c
index 310bf9a73..1ca67345c 100644
--- a/clutter/clutter-gesture-action.c
+++ b/clutter/clutter-gesture-action.c
@@ -236,6 +236,8 @@ cancel_gesture (ClutterGestureAction *action)
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action));
g_signal_emit (action, gesture_signals[GESTURE_CANCEL], 0, actor);
+
+ g_array_set_size (action->priv->points, 0);
}
static gboolean
@@ -301,7 +303,6 @@ stage_captured_event_cb (ClutterActor *stage,
if (!(mods & CLUTTER_BUTTON1_MASK))
{
cancel_gesture (action);
- gesture_unregister_point (action, position);
return CLUTTER_EVENT_PROPAGATE;
}
}
@@ -968,6 +969,4 @@ clutter_gesture_action_cancel (ClutterGestureAction *action)
g_return_if_fail (CLUTTER_IS_GESTURE_ACTION (action));
cancel_gesture (action);
-
- g_array_set_size (action->priv->points, 0);
}