From: Daniel Stone Date: Wed, 21 Mar 2012 02:17:58 +0000 (+0000) Subject: Don't clear real mods in action modmask X-Git-Tag: xkbcommon-0.2.0~721 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1afc6fca4d05f9aae1723f76ab889161f3cf4866;p=platform%2Fupstream%2Flibxkbcommon.git Don't clear real mods in action modmask Previously, we would clear out the real modmask when updating the modmask for action maps, if not using the key's modmask. The correct behaviour here is instead to use the key's modmask if using the modmap, else use the real mods provided with the action originally. Signed-off-by: Daniel Stone --- diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c index f9e0199..f21627e 100644 --- a/src/xkbcomp/compat.c +++ b/src/xkbcomp/compat.c @@ -875,23 +875,15 @@ UpdateActionMods(struct xkb_desc *xkb, union xkb_action *act, uint32_t rmodmask) case XkbSA_SetMods: case XkbSA_LatchMods: case XkbSA_LockMods: - if (act->mods.flags & XkbSA_UseModMapMods) { + if (act->mods.flags & XkbSA_UseModMapMods) act->mods.real_mods = rmodmask; - act->mods.mask = act->mods.real_mods; - } - else { - act->mods.mask = 0; - } + act->mods.mask = act->mods.real_mods; act->mods.mask |= VModsToReal(xkb, act->mods.vmods); break; case XkbSA_ISOLock: - if (act->iso.flags & XkbSA_UseModMapMods) { + if (act->iso.flags & XkbSA_UseModMapMods) act->iso.real_mods = rmodmask; - act->iso.mask = act->iso.real_mods; - } - else { - act->iso.mask = 0; - } + act->iso.mask = act->iso.real_mods; act->iso.mask |= VModsToReal(xkb, act->iso.vmods); break; default: