[clutter] gesture-action: Make _cancel() callable after the gesture has started
- From: Emanuele Aina <emaaa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] gesture-action: Make _cancel() callable after the gesture has started
- Date: Wed, 10 Oct 2012 19:13:24 +0000 (UTC)
commit 1eaa57788347e4271e96b7a1972f323fe859e02b
Author: Emanuele Aina <emanuele aina collabora com>
Date: Fri Oct 5 12:21:10 2012 +0200
gesture-action: Make _cancel() callable after the gesture has started
https://bugzilla.gnome.org/show_bug.cgi?id=685554
clutter/clutter-gesture-action.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c
index d18e19f..4c9460b 100644
--- a/clutter/clutter-gesture-action.c
+++ b/clutter/clutter-gesture-action.c
@@ -292,6 +292,11 @@ stage_captured_event_cb (ClutterActor *stage,
return CLUTTER_EVENT_PROPAGATE;
}
+ /* clutter_gesture_action_cancel() may have been called during
+ * gesture_prepare(), check that the gesture is still active. */
+ if (!priv->in_gesture)
+ return CLUTTER_EVENT_PROPAGATE;
+
g_signal_emit (action, gesture_signals[GESTURE_BEGIN], 0, actor,
&return_value);
if (!return_value)
@@ -916,7 +921,6 @@ void
clutter_gesture_action_cancel (ClutterGestureAction *action)
{
g_return_if_fail (CLUTTER_IS_GESTURE_ACTION (action));
- g_return_if_fail (!action->priv->in_gesture);
cancel_gesture (action);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]