[gtk+] broadway: Stop using gdk_device_manager_list_devices
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] broadway: Stop using gdk_device_manager_list_devices
- Date: Wed, 26 Oct 2016 14:45:22 +0000 (UTC)
commit d2d209865b6eda557a470b87dbc508e15be657d3
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 25 20:37:35 2016 -0400
broadway: Stop using gdk_device_manager_list_devices
The function is deprecated.
gdk/broadway/gdkdevice-broadway.c | 24 ++++++++++--------------
1 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/gdk/broadway/gdkdevice-broadway.c b/gdk/broadway/gdkdevice-broadway.c
index aa9172d..5c92837 100644
--- a/gdk/broadway/gdkdevice-broadway.c
+++ b/gdk/broadway/gdkdevice-broadway.c
@@ -216,17 +216,14 @@ _gdk_broadway_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)
@@ -240,16 +237,15 @@ void
_gdk_broadway_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);
- G_GNUC_END_IGNORE_DEPRECATIONS;
+ devices = NULL;
+ 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]