Make level3 keys work again

We were not paying attention to consumed modifiers when adding
virtual modifiers. This fixes RH bug 537567.
This commit is contained in:
Matthias Clasen 2009-11-25 01:02:40 -05:00
parent ba218a7789
commit d4b92737ab

View File

@ -618,6 +618,7 @@ translate_key_event (GdkDisplay *display,
GdkKeymap *keymap = gdk_keymap_get_for_display (display); GdkKeymap *keymap = gdk_keymap_get_for_display (display);
gunichar c = 0; gunichar c = 0;
gchar buf[7]; gchar buf[7];
GdkModifierType consumed, state;
event->key.type = xevent->xany.type == KeyPress ? GDK_KEY_PRESS : GDK_KEY_RELEASE; event->key.type = xevent->xany.type == KeyPress ? GDK_KEY_PRESS : GDK_KEY_RELEASE;
event->key.time = xevent->xkey.time; event->key.time = xevent->xkey.time;
@ -633,9 +634,11 @@ translate_key_event (GdkDisplay *display,
event->key.state, event->key.state,
event->key.group, event->key.group,
&event->key.keyval, &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); event->key.is_modifier = _gdk_keymap_key_is_modifier (keymap, event->key.hardware_keycode);
/* Fill in event->string crudely, since various programs /* Fill in event->string crudely, since various programs