[gtk/wip/exalm/scroll-gesture: 3/11] gesturesingle: Pass through scroll events
- From: Alexander Mikhaylenko <alexm src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk/wip/exalm/scroll-gesture: 3/11] gesturesingle: Pass through scroll events
 
- Date: Tue, 28 Sep 2021 19:33:51 +0000 (UTC)
 
commit cb8aad03b6367f6c361db6a1df13b585406745c0
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Sep 17 18:37:43 2021 +0500
    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:
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]