[gtk/keymap-rework-2: 3/18] events: Stop doing elaborate virtual modifier handling
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/keymap-rework-2: 3/18] events: Stop doing elaborate virtual modifier handling
- Date: Mon, 6 Apr 2020 19:16:56 +0000 (UTC)
commit 5ce05a8fd02ff6ecbcd7b1c49819791120e978a3
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 5 10:23:18 2020 -0400
events: Stop doing elaborate virtual modifier handling
These are going away in the GdkModifierType cleanup.
Just compare the modifiers we got.
gdk/gdkevents.c | 11 +----------
1 file changed, 1 insertion(+), 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]