[gtk+/gestures: 82/117] longpress: Ensure check() happens after cancel()



commit 4ff995674137c35522bb1a65aa4572069fbe6e56
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Apr 8 21:11:27 2014 +0200

    longpress: Ensure check() happens after cancel()
    
    And delegate on GtkGesture::check(), it does deal better with
    extra fleeting touches.

 gtk/gtkgesturelongpress.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkgesturelongpress.c b/gtk/gtkgesturelongpress.c
index c833cea..79805a5 100644
--- a/gtk/gtkgesturelongpress.c
+++ b/gtk/gtkgesturelongpress.c
@@ -62,7 +62,7 @@ gtk_gesture_long_press_check (GtkGesture *gesture)
   if (priv->cancelled)
     return FALSE;
 
-  return gtk_gesture_is_active (gesture);
+  return GTK_GESTURE_CLASS (gtk_gesture_long_press_parent_class)->check (gesture);
 }
 
 static gboolean
@@ -136,6 +136,7 @@ gtk_gesture_long_press_update (GtkGesture       *gesture,
         }
 
       priv->cancelled = TRUE;
+      gtk_gesture_check (gesture);
     }
 }
 


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