wayland: Observe GDK_SEAT_CAPABILITY_TABLET_STYLUS on gdk_seat_get_slaves()
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 25 Jul 2017 13:35:41 +0000 (15:35 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 25 Jul 2017 13:35:41 +0000 (15:35 +0200)
This flag wasn't being honored so far...

gdk/wayland/gdkdevice-wayland.c

index bdf694544035d8dbe3be11219cb1afca4543656f..f3bf2b4064ae8da81d99bd4091dd92843c75a096 100644 (file)
@@ -4909,6 +4909,19 @@ gdk_wayland_seat_get_slaves (GdkSeat             *seat,
   if (wayland_seat->touch && (capabilities & GDK_SEAT_CAPABILITY_TOUCH))
     slaves = g_list_prepend (slaves, wayland_seat->touch);
 
+  if (wayland_seat->tablets && (capabilities & GDK_SEAT_CAPABILITY_TABLET_STYLUS))
+    {
+      GList *l;
+
+      for (l = wayland_seat->tablets; l; l = l->next)
+        {
+          GdkWaylandTabletData *tablet = l->data;
+
+          slaves = g_list_prepend (slaves, tablet->stylus_device);
+          slaves = g_list_prepend (slaves, tablet->eraser_device);
+        }
+    }
+
   return slaves;
 }