diff options
author | Fabiano FidĂȘncio <fidencio@redhat.com> | 2015-04-14 13:25:38 +0200 |
---|---|---|
committer | Fabiano FidĂȘncio <fidencio@redhat.com> | 2015-04-27 20:07:52 -0300 |
commit | fea2e7bf3515e8a850944715a7caf77f33d1b693 (patch) | |
tree | 87919b82aa950919095fb253eb0e44de7201e3e1 /gdk/mir/gdkmirkeymap.c | |
parent | aa269d93c4a3ccbe3e22c825b326335e46937708 (diff) | |
download | gtk+-fea2e7bf3515e8a850944715a7caf77f33d1b693.tar.gz |
gdkkeys: Add support to _get_scroll_lock_state()
GdkKeymap already has support for _get_num_lock_state() and
_get_caps_lock_state(). Adding _get_scroll_lock_state() would be good
for completness and some backends (Windows?) could take advantage of
this.
Diffstat (limited to 'gdk/mir/gdkmirkeymap.c')
-rw-r--r-- | gdk/mir/gdkmirkeymap.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdk/mir/gdkmirkeymap.c b/gdk/mir/gdkmirkeymap.c index 82f0d2cf79..88901240e2 100644 --- a/gdk/mir/gdkmirkeymap.c +++ b/gdk/mir/gdkmirkeymap.c @@ -99,6 +99,13 @@ gdk_mir_keymap_get_num_lock_state (GdkKeymap *keymap) } static gboolean +gdk_mir_keymap_get_scroll_lock_state (GdkKeymap *keymap) +{ + //g_printerr ("gdk_mir_keymap_get_scroll_lock_state\n"); + return xkb_state_led_name_is_active (GDK_MIR_KEYMAP (keymap)->xkb_state, XKB_LED_NAME_SCROLL); +} + +static gboolean gdk_mir_keymap_get_entries_for_keyval (GdkKeymap *keymap, guint keyval, GdkKeymapKey **keys, @@ -470,6 +477,7 @@ gdk_mir_keymap_class_init (GdkMirKeymapClass *klass) keymap_class->have_bidi_layouts = gdk_mir_keymap_have_bidi_layouts; keymap_class->get_caps_lock_state = gdk_mir_keymap_get_caps_lock_state; keymap_class->get_num_lock_state = gdk_mir_keymap_get_num_lock_state; + keymap_class->get_scroll_lock_state = gdk_mir_keymap_get_scroll_lock_state; keymap_class->get_entries_for_keyval = gdk_mir_keymap_get_entries_for_keyval; keymap_class->get_entries_for_keycode = gdk_mir_keymap_get_entries_for_keycode; keymap_class->lookup_key = gdk_mir_keymap_lookup_key; |