[gtk+/gtk-2-16] Handle accelerators involving virtual modifiers better
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-16] Handle accelerators involving virtual modifiers better
- Date: Sat, 29 Aug 2009 02:43:42 +0000 (UTC)
commit edbf79b956a53701370f3f37adca7a13bc891a5c
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Aug 17 13:38:06 2009 -0400
Handle accelerators involving virtual modifiers better
The previous code would trigger on an unmodified 'S' key for a
'Super+S' accel. The current code avoids that at the cost of breaking
combinations like 'Mod4+Super+S' which are too exotic to worry about...
Bug 591526
gtk/gtkkeyhash.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkkeyhash.c b/gtk/gtkkeyhash.c
index 3de8830..298f94c 100644
--- a/gtk/gtkkeyhash.c
+++ b/gtk/gtkkeyhash.c
@@ -420,8 +420,8 @@ _gtk_key_hash_lookup (GtkKeyHash *key_hash,
xmods = GDK_MOD2_MASK|GDK_MOD3_MASK|GDK_MOD4_MASK|GDK_MOD5_MASK;
vmods = GDK_SUPER_MASK|GDK_HYPER_MASK|GDK_META_MASK;
- if ((entry->modifiers & ~consumed_modifiers & mask & ~vmods) == (state & ~consumed_modifiers & mask & ~vmods) ||
- (entry->modifiers & ~consumed_modifiers & mask & ~xmods) == (state & ~consumed_modifiers & mask & ~xmods))
+ if ((entry->modifiers & ~consumed_modifiers & mask) == (state & ~consumed_modifiers & mask & ~vmods) ||
+ (entry->modifiers & ~consumed_modifiers & mask) == (state & ~consumed_modifiers & mask & ~xmods))
{
gint i;
@@ -430,7 +430,7 @@ _gtk_key_hash_lookup (GtkKeyHash *key_hash,
GTK_NOTE (KEYBINDINGS,
g_message (" found exact match, keyval = %u, modifiers = 0x%04x",
entry->keyval, entry->modifiers));
-
+
if (!have_exact)
{
g_slist_free (results);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]