diff options
author | Matthias Clasen <mclasen@redhat.com> | 2009-08-17 13:38:06 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2009-08-17 13:46:30 -0400 |
commit | 270a95f12e2375227218ec66da4e112d8f331f77 (patch) | |
tree | 3812f3f3fd91ec410cfc328d0a563d39cb84a42c | |
parent | be83e8789c3d29ebdd6cb27af5227d2141f92e6c (diff) | |
download | gtk+-270a95f12e2375227218ec66da4e112d8f331f77.tar.gz |
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
-rw-r--r-- | gtk/gtkkeyhash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkkeyhash.c b/gtk/gtkkeyhash.c index 3de8830ebe..298f94c5d6 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); |