Commit 270a95f1 authored by Matthias Clasen's avatar Matthias Clasen

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
parent be83e878
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment