summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorErkki Seppälä <erkki.seppala@vincit.fi>2011-01-21 15:56:22 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2011-01-27 14:22:02 +1000
commit5927e070b45fbe3fea4b394920ffd6f7d036f1ed (patch)
tree473de20a958baa78c7d860fdadde554c17592722 /xkb
parentbe3be7580b6f6fd2f7fa4d4abfe5e1ab19470223 (diff)
xkb: Cancel a key's repetition when its autorepeat is disabled.
When XkbChangeEnabledControls is called to disable key repetition of a certain key (or keys), currently ongoing repetition of that key was not cancelled. It was cancelled if ChangeKeyboardControl was used to disable key repetition globally. Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index bbb1d9df8..6fd66c5e5 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -915,9 +915,14 @@ ProcXkbSetControls(ClientPtr client)
stuff->axtOptsMask);
}
- if (stuff->changeCtrls & XkbPerKeyRepeatMask)
+ if (stuff->changeCtrls & XkbPerKeyRepeatMask) {
memcpy(new.per_key_repeat, stuff->perKeyRepeat,
XkbPerKeyBitArraySize);
+ if (xkbi->repeatKey &&
+ !BitIsOn(new.per_key_repeat, xkbi->repeatKey)) {
+ AccessXCancelRepeatKey(xkbi, xkbi->repeatKey);
+ }
+ }
old= *ctrl;
*ctrl= new;