diff options
author | Erkki Seppälä <erkki.seppala@vincit.fi> | 2011-01-21 15:56:22 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-01-27 14:22:02 +1000 |
commit | 5927e070b45fbe3fea4b394920ffd6f7d036f1ed (patch) | |
tree | 473de20a958baa78c7d860fdadde554c17592722 /xkb | |
parent | be3be7580b6f6fd2f7fa4d4abfe5e1ab19470223 (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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; |