[gtk/wip/exalm/touchpad-events] main: Use the seat pointer device for touchpad gesture events




commit a05fd4969412e198af63b9009602310db3b55789
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Feb 23 19:22:48 2021 +0500

    main: Use the seat pointer device for touchpad gesture events
    
    In cab1dcb6960d1efb4dee916a1c804c908664c530, events stopped carrying around
    a separate source device, and instead the seat pointer is always used as
    the device for scroll events. However, this is also relevant for touchpad
    gesture events and they are ignored otherwise.

 gtk/gtkmain.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 4ad1802b70..cdc9c03e36 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1379,10 +1379,12 @@ handle_pointing_event (GdkEvent *event)
   type = gdk_event_get_event_type (event);
   sequence = gdk_event_get_event_sequence (event);
 
-  if (type == GDK_SCROLL &&
-      (gdk_device_get_source (device) == GDK_SOURCE_TOUCHPAD ||
-       gdk_device_get_source (device) == GDK_SOURCE_TRACKPOINT ||
-       gdk_device_get_source (device) == GDK_SOURCE_MOUSE))
+  if ((type == GDK_SCROLL &&
+       (gdk_device_get_source (device) == GDK_SOURCE_TOUCHPAD ||
+        gdk_device_get_source (device) == GDK_SOURCE_TRACKPOINT ||
+        gdk_device_get_source (device) == GDK_SOURCE_MOUSE)) ||
+      type == GDK_TOUCHPAD_SWIPE ||
+      type == GDK_TOUCHPAD_PINCH)
     {
       /* A bit of a kludge, resolve target lookups for scrolling devices
        * on the seat pointer.


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