From abeabc39e8110b84d6f97456ed09271138066a34 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 21 Mar 2020 10:25:06 -0400 Subject: [PATCH] x11: Fix key event state translation In the event refactoring, a bit was lost. This makes Ctrl-Shift-i work again to open the inspector. --- gdk/x11/gdkdevicemanager-xi2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index 26adf00313..6e6ba54c93 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -1520,7 +1520,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, { XIDeviceEvent *xev = (XIDeviceEvent *) ev; GdkKeymap *keymap = gdk_display_get_keymap (display); - GdkModifierType consumed, state; + GdkModifierType consumed, state, orig_state; guint keyval; GDK_DISPLAY_NOTE (display, EVENTS, @@ -1550,9 +1550,10 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, xev->group.effective, &keyval, NULL, NULL, &consumed); - + orig_state = state; state &= ~consumed; _gdk_x11_keymap_add_virt_mods (keymap, &state); + state |= orig_state; event = gdk_event_key_new (xev->evtype == XI_KeyPress ? GDK_KEY_PRESS