GdkWindow: Iterate through seats in gdk_window_set_cursor()
And set the pointer on all seat pointers, equivalent to the master pointer lookup we were performing with GdkDeviceManager
This commit is contained in:
parent
ff686344c9
commit
b4aa498fe7
@ -6212,28 +6212,21 @@ gdk_window_set_cursor (GdkWindow *window,
|
|||||||
|
|
||||||
if (!GDK_WINDOW_DESTROYED (window))
|
if (!GDK_WINDOW_DESTROYED (window))
|
||||||
{
|
{
|
||||||
GdkDeviceManager *device_manager;
|
GdkDevice *device;
|
||||||
GList *devices, *d;
|
GList *seats, *s;
|
||||||
|
|
||||||
if (cursor)
|
if (cursor)
|
||||||
window->cursor = g_object_ref (cursor);
|
window->cursor = g_object_ref (cursor);
|
||||||
|
|
||||||
device_manager = gdk_display_get_device_manager (display);
|
seats = gdk_display_list_seats (display);
|
||||||
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
|
|
||||||
|
|
||||||
for (d = devices; d; d = d->next)
|
for (s = seats; s; s = s->next)
|
||||||
{
|
{
|
||||||
GdkDevice *device;
|
device = gdk_seat_get_pointer (s->data);
|
||||||
|
|
||||||
device = d->data;
|
|
||||||
|
|
||||||
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
gdk_window_set_cursor_internal (window, device, window->cursor);
|
gdk_window_set_cursor_internal (window, device, window->cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_list_free (devices);
|
g_list_free (seats);
|
||||||
g_object_notify_by_pspec (G_OBJECT (window), properties[PROP_CURSOR]);
|
g_object_notify_by_pspec (G_OBJECT (window), properties[PROP_CURSOR]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user