diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 31da0d890a..e21ea17372 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -10638,15 +10638,12 @@ send_focus_change (GtkWidget *widget, GdkDevice *device, gboolean in) { - GdkDeviceManager *device_manager; + GdkSeat *seat; GList *devices, *d; - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - 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)); - G_GNUC_END_IGNORE_DEPRECATIONS; + 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) { @@ -10654,14 +10651,10 @@ send_focus_change (GtkWidget *widget, GdkEvent *fevent; GdkWindow *window; - if (gdk_device_get_source (dev) != GDK_SOURCE_KEYBOARD) - continue; - - window = gtk_widget_get_window (widget); - /* Skip non-master keyboards that haven't * selected for events from this window */ + window = gtk_widget_get_window (widget); if (gdk_device_get_device_type (dev) != GDK_DEVICE_TYPE_MASTER && !gdk_window_get_device_events (window, dev)) continue;