[gnome-photos/wip/rishi/zoom: 10/10] preview-nav-buttons: Handle touch events during the capture phase



commit aa8201e2dfe484570fb2facf8cf01e28ba228f2d
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jun 15 12:07:38 2017 +0200

    preview-nav-buttons: Handle touch events during the capture phase
    
    Single touch gestures are delivered with
    GdkEventTouch:emulating_pointer set to TRUE. This means that once the
    event reaches the target phase.
    
    Fallout from b121e86bcdb1ba3bd55754e676b0c7a4cba9d116
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742662

 src/photos-preview-nav-buttons.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index ebcab6f..b8fbda0 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -512,6 +512,7 @@ photos_preview_nav_buttons_constructed (GObject *object)
                             self);
 
   self->long_press_gesture = gtk_gesture_long_press_new (self->preview_view);
+  gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (self->long_press_gesture), 
GTK_PHASE_CAPTURE);
   gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (self->long_press_gesture), TRUE);
   g_signal_connect_swapped (self->long_press_gesture,
                             "pressed",
@@ -519,6 +520,7 @@ photos_preview_nav_buttons_constructed (GObject *object)
                             self);
 
   self->tap_gesture = gtk_gesture_multi_press_new (self->preview_view);
+  gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (self->tap_gesture), GTK_PHASE_CAPTURE);
   gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (self->tap_gesture), TRUE);
   gtk_gesture_group (self->long_press_gesture, self->tap_gesture);
   g_signal_connect_swapped (self->tap_gesture,


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