From d4b92737abaf1f7d25090cc989846ca130617b73 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 25 Nov 2009 01:02:40 -0500 Subject: [PATCH] Make level3 keys work again We were not paying attention to consumed modifiers when adding virtual modifiers. This fixes RH bug 537567. --- gdk/x11/gdkevents-x11.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c index 032f9a5..a9efe76 100644 --- a/gdk/x11/gdkevents-x11.c +++ b/gdk/x11/gdkevents-x11.c @@ -618,6 +618,7 @@ translate_key_event (GdkDisplay *display, GdkKeymap *keymap = gdk_keymap_get_for_display (display); gunichar c = 0; gchar buf[7]; + GdkModifierType consumed, state; event->key.type = xevent->xany.type == KeyPress ? GDK_KEY_PRESS : GDK_KEY_RELEASE; event->key.time = xevent->xkey.time; @@ -633,9 +634,11 @@ translate_key_event (GdkDisplay *display, event->key.state, event->key.group, &event->key.keyval, - NULL, NULL, NULL); + NULL, NULL, &consumed); + state = event->key.state & ~consumed; + _gdk_keymap_add_virtual_modifiers (keymap, &state); + event->key.state |= state; - _gdk_keymap_add_virtual_modifiers (keymap, &event->key.state); event->key.is_modifier = _gdk_keymap_key_is_modifier (keymap, event->key.hardware_keycode); /* Fill in event->string crudely, since various programs -- 1.6.5.2