diff options
author | Andreas Wettstein <wettstein509@solnet.ch> | 2011-08-11 16:33:33 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-10-25 14:06:41 +1000 |
commit | e3f6a76dd480717eae4b17ad8e2ff707de2ffe4c (patch) | |
tree | 4df348ea327535bbdd883027276d191fc191c8e4 /xkb | |
parent | 6f33593dc087d367d899d1cb6e6e30b282d922e2 (diff) |
xkb: Support noLock and noUnlock flags for LockMods
These flags are required by the XKB spec section 6.3.
Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbActions.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 4b5405ab0..000002a45 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -344,15 +344,18 @@ _XkbFilterLockState( XkbSrvInfoPtr xkbi, filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; - filter->priv = 0; + filter->priv = xkbi->state.locked_mods&pAction->mods.mask; filter->filter = _XkbFilterLockState; filter->upAction = *pAction; - xkbi->state.locked_mods^= pAction->mods.mask; + if (!(filter->upAction.mods.flags&XkbSA_LockNoLock)) + xkbi->state.locked_mods|= pAction->mods.mask; xkbi->setMods = pAction->mods.mask; } else if (filter->keycode==keycode) { filter->active = 0; xkbi->clearMods = filter->upAction.mods.mask; + if (!(filter->upAction.mods.flags&XkbSA_LockNoUnlock)) + xkbi->state.locked_mods&= ~filter->priv; } return 1; } |