diff options
-rw-r--r-- | gdk/x11/gdkdevicemanager-xi2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index 2fa6a749c5..505f6ab7ef 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -1936,8 +1936,11 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, device = g_hash_table_lookup (device_manager->id_table, GINT_TO_POINTER (xev->deviceid)); - source_device = g_hash_table_lookup (device_manager->id_table, - GUINT_TO_POINTER (xev->sourceid)); + if (xev->sourceid != xev->deviceid) + source_device = g_hash_table_lookup (device_manager->id_table, + GUINT_TO_POINTER (xev->sourceid)); + else + source_device = NULL; _gdk_device_manager_xi2_handle_focus (surface, xev->event, |