The XKB protocol specification demands support for these flags.
Signed-off-by: Andreas Wettstein <[email protected]>
---
xkb/xkbActions.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 89360df..84190df 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -688,14 +688,22 @@ _XkbFilterControls(XkbSrvInfoPtr xkbi,
filter->keycode = keycode;
filter->active = 1;
filter->filterOthers = 0;
- change = XkbActionCtrls(&pAction->ctrls);
+ change = (XkbActionCtrls(&pAction->ctrls) & ~ctrls->enabled_ctrls);
filter->priv = change;
filter->filter = _XkbFilterControls;
filter->upAction = *pAction;
if (pAction->type == XkbSA_LockControls) {
- filter->priv = (ctrls->enabled_ctrls & change);
- change &= ~ctrls->enabled_ctrls;
+ if (pAction->ctrls.flags & XkbSA_LockNoUnlock)
+ filter->priv = 0;
+ else
+ /* The protocol specification says we should unlock controls
+ are NOT currently enabled. As this does not make any sense,
+ let's assume this is a typo and do the opposite. */
+ filter->priv = (XkbActionCtrls(&pAction->ctrls) &
ctrls->enabled_ctrls);
+
+ if (pAction->ctrls.flags & XkbSA_LockNoLock)
+ change = 0;
}
if (change) {
--
1.8.3.1
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel