[gtk+/gestures: 47/92] swipe: Dont emit swipe() if the gesture was denied rather than finished



commit 47b9093eba93ad83ee5e0e08d66bf5e3d0df8a3e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Mar 25 13:45:17 2014 +0100

    swipe: Dont emit swipe() if the gesture was denied rather than finished

 gtk/gtkgestureswipe.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkgestureswipe.c b/gtk/gtkgestureswipe.c
index 60fb3f7..d04504a 100644
--- a/gtk/gtkgestureswipe.c
+++ b/gtk/gtkgestureswipe.c
@@ -143,6 +143,9 @@ gtk_gesture_swipe_end (GtkGesture       *gesture,
   gdouble velocity_x, velocity_y;
   guint32 evtime;
 
+  if (gtk_gesture_get_sequence_state (gesture, sequence) == GTK_EVENT_SEQUENCE_DENIED)
+    return;
+
   priv = gtk_gesture_swipe_get_instance_private (swipe);
   gtk_gesture_get_last_update_time (gesture, sequence, &evtime);
   _gtk_gesture_swipe_clear_backlog (swipe, evtime);


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