[gtk+/gestures: 79/92] gesturesingle: check the current sequence before resetting the pressed button



commit 61048f313af320cea4c43289c2e1796c8fff337e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Apr 8 21:06:39 2014 +0200

    gesturesingle: check the current sequence before resetting the pressed button

 gtk/gtkgesturesingle.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkgesturesingle.c b/gtk/gtkgesturesingle.c
index d274b7b..1f871c3 100644
--- a/gtk/gtkgesturesingle.c
+++ b/gtk/gtkgesturesingle.c
@@ -169,7 +169,8 @@ gtk_gesture_single_handle_event (GtkEventController *controller,
 
       priv->current_button = button;
     }
-  else if (event->type == GDK_BUTTON_RELEASE || event->type == GDK_TOUCH_END)
+  else if (sequence == priv->current_sequence &&
+           (event->type == GDK_BUTTON_RELEASE || event->type == GDK_TOUCH_END))
     priv->current_button = 0;
 
   return GTK_EVENT_CONTROLLER_CLASS (gtk_gesture_single_parent_class)->handle_event (controller, event);


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