x11: Stop using gdk_device_manager_list_devices

The function has been deprecated.
This commit is contained in:
Matthias Clasen 2016-10-25 20:38:05 -04:00
parent d2d209865b
commit 35fda80a4b

View File

@ -152,17 +152,14 @@ _gdk_x11_window_grab_check_unmap (GdkWindow *window,
gulong serial)
{
GdkDisplay *display = gdk_window_get_display (window);
GdkDeviceManager *device_manager;
GdkSeat *seat;
GList *devices, *d;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
device_manager = gdk_display_get_device_manager (display);
seat = gdk_display_get_default_seat (display);
/* Get all devices */
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_SLAVE));
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING));
G_GNUC_END_IGNORE_DEPRECATIONS;
devices = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_ALL);
devices = g_list_prepend (devices, gdk_seat_get_keyboard (seat));
devices = g_list_prepend (devices, gdk_seat_get_pointer (seat));
/* End all grabs on the newly hidden window */
for (d = devices; d; d = d->next)
@ -182,18 +179,15 @@ void
_gdk_x11_window_grab_check_destroy (GdkWindow *window)
{
GdkDisplay *display = gdk_window_get_display (window);
GdkDeviceManager *device_manager;
GdkSeat *seat;
GdkDeviceGrabInfo *grab;
GList *devices, *d;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
device_manager = gdk_display_get_device_manager (display);
seat = gdk_display_get_default_seat (display);
/* Get all devices */
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_SLAVE));
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING));
G_GNUC_END_IGNORE_DEPRECATIONS;
devices = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_ALL);
devices = g_list_prepend (devices, gdk_seat_get_keyboard (seat));
devices = g_list_prepend (devices, gdk_seat_get_pointer (seat));
for (d = devices; d; d = d->next)
{