From 63b59e07177beb5e7a0a4a5af4c44ed6954f9ddc Mon Sep 17 00:00:00 2001 From: Alexander Mikhaylenko Date: Fri, 17 Sep 2021 18:37:43 +0500 Subject: [PATCH] gesturesingle: Pass through scroll events We want to have them in GtkGestureDrag/Pan/Swipe. Ignore motion events when no button is pressed - otherwise moving the widget under the poitner in response to scrolling or a touchpad swipe would interfere with them. --- gtk/gtkgesturesingle.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/gtkgesturesingle.c b/gtk/gtkgesturesingle.c index 8a4b7a14c5..e7ad623a0e 100644 --- a/gtk/gtkgesturesingle.c +++ b/gtk/gtkgesturesingle.c @@ -196,10 +196,14 @@ gtk_gesture_single_handle_event (GtkEventController *controller, } } + if (button == 0) + return FALSE; + break; case GDK_TOUCH_CANCEL: case GDK_GRAB_BROKEN: case GDK_TOUCHPAD_SWIPE: + case GDK_SCROLL: return GTK_EVENT_CONTROLLER_CLASS (gtk_gesture_single_parent_class)->handle_event (controller, event, x, y); break; default: