diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index 4aea232070..83e6bb6b43 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -235,16 +235,6 @@ gdk_x11_device_xi2_query_state (GdkDevice *device, scale = GDK_X11_SURFACE (surface)->surface_scale; } - if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_PHYSICAL) - { - GdkDevice *logical = gdk_device_get_associated_device (device); - - if (logical != NULL) - _gdk_device_query_state (logical, surface, child_surface, - win_x, win_y, mask); - return; - } - if (!GDK_X11_DISPLAY (display)->trusted_client || !XIQueryPointer (GDK_DISPLAY_XDISPLAY (display), device_xi2->device_id, diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index d8327f2ec2..5620e8ef87 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -914,7 +914,7 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager, else if (ev->info[i].flags & XISlaveAttached || ev->info[i].flags & XISlaveDetached) { - GdkDevice *logical, *physical; + GdkDevice *logical = NULL, *physical; GdkSeat *seat; physical = g_hash_table_lookup (device_manager->id_table, @@ -923,17 +923,8 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager, if (!physical) continue; - /* Remove old logical device info */ - logical = gdk_device_get_associated_device (physical); - - if (logical != NULL) - { - _gdk_device_remove_physical_device (logical, physical); - _gdk_device_set_associated_device (physical, NULL); - - seat = gdk_device_get_seat (logical); - gdk_seat_default_remove_physical_device (GDK_SEAT_DEFAULT (seat), physical); - } + seat = gdk_device_get_seat (physical); + gdk_seat_default_remove_physical_device (GDK_SEAT_DEFAULT (seat), physical); /* Add new logical device if it's an attachment event */ if (ev->info[i].flags & XISlaveAttached) diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c index ba119a45b8..cc6afd9e90 100644 --- a/gdk/x11/gdkdrag-x11.c +++ b/gdk/x11/gdkdrag-x11.c @@ -2208,11 +2208,13 @@ gdk_dnd_handle_key_event (GdkDrag *drag, GdkX11Drag *x11_drag = GDK_X11_DRAG (drag); GdkModifierType state; GdkDevice *pointer; + GdkSeat *seat; int dx, dy; dx = dy = 0; state = gdk_event_get_modifier_state (event); - pointer = gdk_device_get_associated_device (gdk_event_get_device (event)); + seat = gdk_event_get_seat (event); + pointer = gdk_seat_get_pointer (seat); if (event->event_type == GDK_KEY_PRESS) {