[clutter] gesture-action: Unregister all tracked points on cancel
- From: Emanuele Aina <emaaa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] gesture-action: Unregister all tracked points on cancel
- Date: Fri, 19 Oct 2012 12:02:13 +0000 (UTC)
commit bd1febb2eaa73c2925785e3b5f5a7d7ab70d9692
Author: Emanuele Aina <emanuele aina collabora com>
Date: Mon Oct 1 17:29:01 2012 +0200
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
clutter/clutter-gesture-action.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c
index 310bf9a..1ca6734 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]