xkbcomp/keymap: correct ACTION_MODS_LOOKUP_MODS handling
The xkblib spec says: If XkbSA_UseModMapMods is not set in the flags field, the mask, real_mods, vmods1, and vmods2 fields are used to determine the action modifiers. Otherwise they are ignored and the modifiers bound to the key (client map->modmap[keycode]) are used instead. So we should just assign the modmap without considering what's there. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
9aee332e9f
commit
9c2a5c6c61
|
@ -47,29 +47,19 @@ ComputeEffectiveMask(struct xkb_keymap *keymap, struct xkb_mods *mods)
|
|||
|
||||
static void
|
||||
UpdateActionMods(struct xkb_keymap *keymap, union xkb_action *act,
|
||||
xkb_mod_mask_t rmodmask)
|
||||
xkb_mod_mask_t modmap)
|
||||
{
|
||||
unsigned int flags;
|
||||
struct xkb_mods *mods;
|
||||
|
||||
switch (act->type) {
|
||||
case ACTION_TYPE_MOD_SET:
|
||||
case ACTION_TYPE_MOD_LATCH:
|
||||
case ACTION_TYPE_MOD_LOCK:
|
||||
flags = act->mods.flags;
|
||||
mods = &act->mods.mods;
|
||||
if (act->mods.flags & ACTION_MODS_LOOKUP_MODMAP)
|
||||
act->mods.mods.mods = modmap;
|
||||
ComputeEffectiveMask(keymap, &act->mods.mods);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
if (flags & ACTION_MODS_LOOKUP_MODMAP) {
|
||||
/* XXX: what's that. */
|
||||
mods->mods &= 0xff;
|
||||
mods->mods |= rmodmask;
|
||||
}
|
||||
ComputeEffectiveMask(keymap, mods);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue