summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-07-25 15:37:10 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-07-26 13:08:50 +0200
commit312773a9271490324055992be33d6526d60854b0 (patch)
tree7365aef521f7c9e53f48f7c1cb7f880569004db8 /gdk
parent5b9adfba466b53a7fb67d943f40f562d8c9acaaa (diff)
downloadgtk+-312773a9271490324055992be33d6526d60854b0.tar.gz
gdkwindow: Update cursor for tablet tools in the window
This check must be done explicitly on Wayland as the master device for tablet tools differ from the Core Pointer. This ensures that whenever a tablet tool is inside a window and the cursor is programmatically changed, it will be visually updated too. https://bugzilla.gnome.org/show_bug.cgi?id=785375
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdkwindow.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 04f488d2cf..e8f630bd8a 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -4588,8 +4588,18 @@ gdk_window_set_cursor (GdkWindow *window,
for (s = seats; s; s = s->next)
{
+ GList *devices, *d;
+
device = gdk_seat_get_pointer (s->data);
gdk_window_set_cursor_internal (window, device, window->cursor);
+
+ devices = gdk_seat_get_slaves (s->data, GDK_SEAT_CAPABILITY_TABLET_STYLUS);
+ for (d = devices; d; d = d->next)
+ {
+ device = gdk_device_get_associated_device (d->data);
+ gdk_window_set_cursor_internal (window, device, window->cursor);
+ }
+ g_list_free (devices);
}
g_list_free (seats);