gtk/main: Do not use touchpad event sequence for pointer focus lookup
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 26 Jan 2022 14:59:36 +0000 (15:59 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 26 Jan 2022 14:59:36 +0000 (15:59 +0100)
Despite touchpad gestures having a sequence, these must use the logical
pointer focus. Avoid using the sequence for GtkPointerFocus lookups with
those events, in order to ensure those events make it all the way to the
intended target.

This is fallout from adding GdkEventSequence information to touchpad
gestures.

gtk/gtkmain.c

index c96bfb3c81df0578dd401370165587ed24b06e1f..bfab35ad61becd03b7a2ddd5e99bc082e22a64b0 100644 (file)
@@ -1352,6 +1352,14 @@ handle_pointing_event (GdkEvent *event)
        */
       device = gdk_seat_get_pointer (gdk_event_get_seat (event));
     }
+  else if (type == GDK_TOUCHPAD_PINCH ||
+           type == GDK_TOUCHPAD_SWIPE)
+    {
+      /* Another bit of a kludge, touchpad gesture sequences do not
+       * reflect on the pointer focus lookup.
+       */
+      sequence = NULL;
+    }
 
   switch ((guint) type)
     {