XI2: translate group state back into core state

This is necessary to make the key event translation work
as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=641367
This commit is contained in:
Matthias Clasen 2011-02-04 21:08:41 -05:00
parent d4c1dbe3d7
commit eaba2cd468

View File

@ -728,5 +728,17 @@ _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
}
}
if (group_state)
{
gint group;
group = group_state->base + group_state->latched + group_state->locked;
/* FIXME: do we need the XKB complications for this ? */
group = CLAMP(group, 0, 3);
state |= group << 13;
}
return state;
}