[gtk+] wayland: Hook up _get_num_lock / _get_caps_lock to read from XKB state



commit d2c66e5afd72de279313ffb79952dd89889a7fe4
Author: Josà Dapena Paz <jdapena igalia com>
Date:   Mon Jul 16 19:51:48 2012 +0100

    wayland: Hook up _get_num_lock / _get_caps_lock to read from XKB state
    
    Signed-off-by: Rob Bradford <rob linux intel com>

 gdk/wayland/gdkkeys-wayland.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkkeys-wayland.c b/gdk/wayland/gdkkeys-wayland.c
index 5de6408..819ff9c 100644
--- a/gdk/wayland/gdkkeys-wayland.c
+++ b/gdk/wayland/gdkkeys-wayland.c
@@ -84,13 +84,15 @@ gdk_wayland_keymap_have_bidi_layouts (GdkKeymap *keymap)
 static gboolean
 gdk_wayland_keymap_get_caps_lock_state (GdkKeymap *keymap)
 {
-  return FALSE;
+  return xkb_state_led_name_is_active (GDK_WAYLAND_KEYMAP (keymap)->xkb_state,
+                                       XKB_LED_NAME_CAPS);
 }
 
 static gboolean
 gdk_wayland_keymap_get_num_lock_state (GdkKeymap *keymap)
 {
-  return FALSE;
+  return xkb_state_led_name_is_active (GDK_WAYLAND_KEYMAP (keymap)->xkb_state,
+                                       XKB_LED_NAME_NUM);
 }
 
 static gboolean



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