diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-04-05 10:23:18 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-04-06 15:13:54 -0400 |
commit | 5ce05a8fd02ff6ecbcd7b1c49819791120e978a3 (patch) | |
tree | 40a1a8901d286f7f4eb44a165a209b6349b8dfd3 /gdk/gdkevents.c | |
parent | be2a0971c2d50d1630eb2531ed05952f177d0a7e (diff) | |
download | gtk+-5ce05a8fd02ff6ecbcd7b1c49819791120e978a3.tar.gz |
events: Stop doing elaborate virtual modifier handling
These are going away in the GdkModifierType cleanup.
Just compare the modifiers we got.
Diffstat (limited to 'gdk/gdkevents.c')
-rw-r--r-- | gdk/gdkevents.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index b2c28b8262..100609f546 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -2191,9 +2191,6 @@ gdk_event_matches (GdkEvent *event, GdkModifierType consumed_modifiers; GdkModifierType shift_group_mask; gboolean group_mod_is_accel_mod = FALSE; - const GdkModifierType xmods = GDK_MOD2_MASK|GDK_MOD3_MASK|GDK_MOD4_MASK|GDK_MOD5_MASK; - const GdkModifierType vmods = GDK_SUPER_MASK|GDK_HYPER_MASK|GDK_META_MASK; - GdkModifierType mods; if (gdk_event_get_event_type (event) != GDK_KEY_PRESS) return GDK_EVENT_MATCH_NONE; @@ -2224,13 +2221,7 @@ gdk_event_matches (GdkEvent *event, if (mask & shift_group_mask) group_mod_is_accel_mod = TRUE; - gdk_keymap_map_virtual_modifiers (keymap, &mask); - gdk_keymap_add_virtual_modifiers (keymap, &state); - - mods = modifiers; - if (gdk_keymap_map_virtual_modifiers (keymap, &mods) && - ((mods & ~consumed_modifiers & mask & ~vmods) == (state & ~consumed_modifiers & mask & ~vmods) || - (mods & ~consumed_modifiers & mask & ~xmods) == (state & ~consumed_modifiers & mask & ~xmods))) + if ((modifiers & ~consumed_modifiers & mask) == (state & ~consumed_modifiers & mask)) { /* modifier match */ GdkKeymapKey *keys; |