gdk/wayland: Return pad devices querying for all devices
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 13 Jun 2023 20:54:23 +0000 (22:54 +0200)
committerSimon McVittie <smcv@debian.org>
Wed, 8 Nov 2023 16:30:21 +0000 (16:30 +0000)
These devices unfortunately didn't ever get a capability flag in
3.24 (fixed in GTK4). We are very far off into maintenance grounds that
it is not ideal to add new flag values, but we could however return
these devices if GDK_SEAT_CAPABILITY_ALL is being asked.

Do that, so it is possible to deal with pad devices, even if it's
not possible to query them specifically.

Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6049
Origin: 3.24.39, commit:a9d7198d63d14e049c399914f11ddd37fc034f3a

Gbp-Pq: Name gdk-wayland-Return-pad-devices-querying-for-all-devices.patch

gdk/wayland/gdkdevice-wayland.c

index dd7db81cf1b72ce3b4592af658dcaa6031bfca6c..a1e4771a74efa548b2a6014ed6d9147a132c78fb 100644 (file)
@@ -5141,6 +5141,21 @@ gdk_wayland_seat_get_slaves (GdkSeat             *seat,
         }
     }
 
+  /* There is no specific capability for pads, return
+   * them anyways if all devices are requested
+   */
+  if (capabilities == GDK_SEAT_CAPABILITY_ALL)
+    {
+      GList *l;
+
+      for (l = wayland_seat->tablet_pads; l; l = l->next)
+        {
+          GdkWaylandTabletPadData *pad = l->data;
+
+          slaves = g_list_prepend (slaves, pad->device);
+        }
+    }
+
   return slaves;
 }