[gtk+/xi2] GdkDeviceManagerXI2: Set devices' keys.



commit 30ce9a4fc05d920e6afca0f42ccf102d116d8487
Author: Carlos Garnacho <carlos gnome org>
Date:   Sun Oct 11 03:08:49 2009 +0200

    GdkDeviceManagerXI2: Set devices' keys.

 gdk/x11/gdkdevicemanager-xi2.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 335ed5e..926cd39 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -148,6 +148,17 @@ translate_device_classes (GdkDisplay      *display,
 
       switch (class_info->type)
         {
+        case XIKeyClass:
+          {
+            XIKeyClassInfo *key_info = (XIKeyClassInfo *) class_info;
+            gint i;
+
+            _gdk_device_set_keys (device, key_info->num_keycodes);
+
+            for (i = 0; i < key_info->num_keycodes; i++)
+              gdk_device_set_key (device, i, key_info->keycodes[i], 0);
+          }
+          break;
         case XIValuatorClass:
           translate_valuator_class (display, device,
                                     (XIValuatorClassInfo *) class_info,



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