[gtk+] GdkWindow: Use the seat to enumerate devices
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GdkWindow: Use the seat to enumerate devices
- Date: Wed, 26 Oct 2016 14:45:37 +0000 (UTC)
commit 9aa1257bd0cbe967bc040f383b8cdca7f2840765
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 26 06:21:39 2016 -0400
GdkWindow: Use the seat to enumerate devices
GdkDeviceManager is going away.
gdk/gdkwindow.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index c46309c..2df16e1 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5028,19 +5028,16 @@ gdk_window_hide (GdkWindow *window)
else if (was_mapped)
{
GdkDisplay *display;
- GdkDeviceManager *device_manager;
+ GdkSeat *seat;
GList *devices, *d;
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-
/* May need to break grabs on children */
display = gdk_window_get_display (window);
- 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));
+ devices = gdk_se (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)
{
@@ -5056,7 +5053,6 @@ gdk_window_hide (GdkWindow *window)
window->state = GDK_WINDOW_STATE_WITHDRAWN;
g_list_free (devices);
- G_GNUC_END_IGNORE_DEPRECATIONS;
}
did_hide = _gdk_window_update_viewable (window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]