[gtk+/multitouch: 114/124] gtkwidget: only emit ::gesture when the last stroke is lifted



commit 7eac3869f00f40954353c49a4f6c41cfc0c7d1db
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Jan 12 02:49:54 2012 +0100

    gtkwidget: only emit ::gesture when the last stroke is lifted

 gtk/gtkwidget.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index a786ccb..073e64d 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -14664,6 +14664,9 @@ _gtk_widget_gesture_finish (GtkWidget *widget)
   interpreter = g_object_get_qdata (G_OBJECT (widget), quark_gestures_interpreter);
   g_assert (interpreter != NULL);
 
+  if (gtk_gestures_interpreter_get_n_active_strokes (interpreter) != 0)
+    return;
+
   if (gtk_gestures_interpreter_finish (interpreter, &gesture))
     g_signal_emit (widget, widget_signals[GESTURE], 0, gesture);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]