[gtk+/gestures] spinbutton: Use GTK_PHASE_CAPTURE for touch swipes



commit ef8dd4ffee23d2171ca1fb24beffb21f6274f59a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu May 22 15:36:32 2014 +0200

    spinbutton: Use GTK_PHASE_CAPTURE for touch swipes
    
    The gesture must be able to catch first events for it to be seen
    as recognized in event handlers.

 gtk/gtkspinbutton.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 5bbd1ca..590e4a6 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -715,14 +715,14 @@ gtk_spin_button_init (GtkSpinButton *spin_button)
   gtk_widget_add_events (GTK_WIDGET (spin_button), GDK_SCROLL_MASK);
 
   priv->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (spin_button));
-  gtk_gesture_attach (priv->long_press_gesture, GTK_PHASE_BUBBLE);
+  gtk_gesture_attach (priv->long_press_gesture, GTK_PHASE_CAPTURE);
   g_signal_connect (priv->long_press_gesture, "pressed",
                     G_CALLBACK (long_press_action), spin_button);
   g_signal_connect (priv->long_press_gesture, "cancelled",
                     G_CALLBACK (long_press_cancel_action), spin_button);
 
   priv->swipe_gesture = gtk_gesture_swipe_new (GTK_WIDGET (spin_button));
-  gtk_gesture_attach (priv->swipe_gesture, GTK_PHASE_BUBBLE);
+  gtk_gesture_attach (priv->swipe_gesture, GTK_PHASE_CAPTURE);
   g_signal_connect (priv->swipe_gesture, "update",
                     G_CALLBACK (swipe_gesture_update), spin_button);
 }


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