[gtk+/gtk-3-22] wayland: Observe GDK_SEAT_CAPABILITY_TABLET_STYLUS on gdk_seat_get_slaves()



commit 3f098332533e36a54330329f5b82b45a69dc7bb8
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Jul 25 15:35:41 2017 +0200

    wayland: Observe GDK_SEAT_CAPABILITY_TABLET_STYLUS on gdk_seat_get_slaves()
    
    This flag wasn't being honored so far...

 gdk/wayland/gdkdevice-wayland.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index bdf6945..f3bf2b4 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -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;
 }
 


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