Commit 7c0a1ddb authored by Matthias Clasen's avatar Matthias Clasen
Browse files

window: Don't use GdkDeviceManager

We can just as well use GdkSeat to enumerate (attached)
devices. Note that this change excludes floating devices
from consideration.
parent 2250daeb
......@@ -7555,26 +7555,20 @@ static void
do_focus_change (GtkWidget *widget,
gboolean in)
GdkWindow *window;
GdkDeviceManager *device_manager;
GdkSeat *seat;
GList *devices, *d;
g_object_ref (widget);
device_manager = gdk_display_get_device_manager (gtk_widget_get_display (widget));
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));
seat = gdk_display_get_default_seat (gtk_widget_get_display (widget));
devices = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_KEYBOARD);
devices = g_list_prepend (devices, gdk_seat_get_keyboard (seat));
for (d = devices; d; d = d->next)
GdkDevice *dev = d->data;
GdkEvent *fevent;
if (gdk_device_get_source (dev) != GDK_SOURCE_KEYBOARD)
GdkWindow *window;
/* Skip non-master keyboards that haven't
* selected for events from this window
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment