[gtk+/xi2: 1161/1239] GdkDeviceManagerXI2: Actually set the device for key events.



commit 03045eb3db4a1d3d68720106fac9bb62ce0ea41b
Author: Carlos Garnacho <carlos gnome org>
Date:   Wed Sep 16 12:25:34 2009 +0200

    GdkDeviceManagerXI2: Actually set the device for key events.

 gdk/x11/gdkdevicemanager-xi2.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 4669f36..082623d 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -856,6 +856,9 @@ gdk_device_manager_xi2_translate_event (GdkEventTranslator *translator,
         event->key.hardware_keycode = xev->detail;
         event->key.is_modifier = _gdk_keymap_key_is_modifier (keymap, event->key.hardware_keycode);
 
+        event->key.device = g_hash_table_lookup (device_manager->id_table,
+                                                 GUINT_TO_POINTER (xev->deviceid));
+
         _gdk_keymap_add_virtual_modifiers (keymap, &event->key.state);
 
         event->key.keyval = GDK_VoidSymbol;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]