diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-08-05 10:53:22 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-08-05 19:25:13 +0200 |
commit | 15e0c175a33a1ead70511174bc308e1809fe7843 (patch) | |
tree | cf06dc1266865a7c28d12a2c825055f5ac5c1f54 /gtk | |
parent | bc953eebdda9f632209838adf5d8455f05afc26a (diff) | |
download | gtk+-15e0c175a33a1ead70511174bc308e1809fe7843.tar.gz |
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.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkgesturezoom.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkgesturezoom.c b/gtk/gtkgesturezoom.c index 9d6116bce1..e60ea3ace8 100644 --- a/gtk/gtkgesturezoom.c +++ b/gtk/gtkgesturezoom.c @@ -150,8 +150,7 @@ gtk_gesture_zoom_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; @@ -162,6 +161,8 @@ gtk_gesture_zoom_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_zoom_parent_class)->filter_event (controller, event); } |