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.
Signed-off-by: Erkki Seppälä <erkki.sepp...@vincit.fi> --- xkb/xkb.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/xkb/xkb.c b/xkb/xkb.c index 7d95bc0..4a2590b 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -915,9 +915,19 @@ ProcXkbSetControls(ClientPtr client) stuff->axtOptsMask); } - if (stuff->changeCtrls & XkbPerKeyRepeatMask) + if (stuff->changeCtrls & XkbPerKeyRepeatMask) { + unsigned key; + memcpy(new.per_key_repeat, stuff->perKeyRepeat, XkbPerKeyBitArraySize); + for (key = 0; key < 8 * XkbPerKeyBitArraySize; ++key) { + unsigned idx = key / 8; + unsigned bit = key % 8; + if (!(new.per_key_repeat[idx] & (1 << bit))) { + AccessXCancelRepeatKey(xkbi, key); + } + } + } old= *ctrl; *ctrl= new; -- 1.7.0.4 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel