From bc953eebdda9f632209838adf5d8455f05afc26a Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 5 Aug 2022 10:50:45 +0200 Subject: [PATCH] gtkgesturerotate: Filter touchpad holds events Since the pinch touchpad gestures already have begin/update/end phases, this gesture has no actual use for these events. --- gtk/gtkgesturerotate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk/gtkgesturerotate.c b/gtk/gtkgesturerotate.c index df174bf646..8bbbede5ae 100644 --- a/gtk/gtkgesturerotate.c +++ b/gtk/gtkgesturerotate.c @@ -173,8 +173,7 @@ gtk_gesture_rotate_filter_event (GtkEventController *controller, GdkEvent *event) { /* Let 2-finger touchpad pinch and hold events go through */ - if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH || - gdk_event_get_event_type (event) == GDK_TOUCHPAD_HOLD) + if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH) { guint n_fingers; @@ -185,6 +184,8 @@ gtk_gesture_rotate_filter_event (GtkEventController *controller, else return TRUE; } + else if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_HOLD) + return TRUE; return GTK_EVENT_CONTROLLER_CLASS (gtk_gesture_rotate_parent_class)->filter_event (controller, event); }