From 43811f5dc03567a76b16b4a8596d200547f771ab Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 12 Aug 2003 18:38:16 +0000 Subject: [PATCH] Remove GDK_LOCK_MASK before calling gdk_keymap_translate_keyboard_state so Tue Aug 12 14:27:42 2003 Owen Taylor * gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Remove GDK_LOCK_MASK before calling gdk_keymap_translate_keyboard_state so bindings and accelerators are independent of the Caps-lock key. (#115384, reported by Toni Willberg) --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkkeyhash.c | 4 ++++ 6 files changed, 44 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9c66860f41..60c06f08cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Aug 12 14:27:42 2003 Owen Taylor + + * gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Remove + GDK_LOCK_MASK before calling + gdk_keymap_translate_keyboard_state so bindings + and accelerators are independent of the Caps-lock + key. (#115384, reported by Toni Willberg) + Mon Aug 11 12:07:14 2003 Owen Taylor * gdk/x11/gdkevents-x11.c (get_real_window): Add missing diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9c66860f41..60c06f08cb 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Tue Aug 12 14:27:42 2003 Owen Taylor + + * gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Remove + GDK_LOCK_MASK before calling + gdk_keymap_translate_keyboard_state so bindings + and accelerators are independent of the Caps-lock + key. (#115384, reported by Toni Willberg) + Mon Aug 11 12:07:14 2003 Owen Taylor * gdk/x11/gdkevents-x11.c (get_real_window): Add missing diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9c66860f41..60c06f08cb 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Tue Aug 12 14:27:42 2003 Owen Taylor + + * gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Remove + GDK_LOCK_MASK before calling + gdk_keymap_translate_keyboard_state so bindings + and accelerators are independent of the Caps-lock + key. (#115384, reported by Toni Willberg) + Mon Aug 11 12:07:14 2003 Owen Taylor * gdk/x11/gdkevents-x11.c (get_real_window): Add missing diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9c66860f41..60c06f08cb 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Tue Aug 12 14:27:42 2003 Owen Taylor + + * gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Remove + GDK_LOCK_MASK before calling + gdk_keymap_translate_keyboard_state so bindings + and accelerators are independent of the Caps-lock + key. (#115384, reported by Toni Willberg) + Mon Aug 11 12:07:14 2003 Owen Taylor * gdk/x11/gdkevents-x11.c (get_real_window): Add missing diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9c66860f41..60c06f08cb 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Tue Aug 12 14:27:42 2003 Owen Taylor + + * gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Remove + GDK_LOCK_MASK before calling + gdk_keymap_translate_keyboard_state so bindings + and accelerators are independent of the Caps-lock + key. (#115384, reported by Toni Willberg) + Mon Aug 11 12:07:14 2003 Owen Taylor * gdk/x11/gdkevents-x11.c (get_real_window): Add missing diff --git a/gtk/gtkkeyhash.c b/gtk/gtkkeyhash.c index 604c9ccd7b..beca28d3c6 100644 --- a/gtk/gtkkeyhash.c +++ b/gtk/gtkkeyhash.c @@ -336,6 +336,10 @@ _gtk_key_hash_lookup (GtkKeyHash *key_hash, gint level; GdkModifierType consumed_modifiers; + /* We don't want Caps_Lock to affect keybinding lookups. + */ + state &= ~GDK_LOCK_MASK; + gdk_keymap_translate_keyboard_state (key_hash->keymap, hardware_keycode, state, group, &keyval, &effective_group, &level, &consumed_modifiers);