[PATCH v2] [xserver] xkb: Cancel a key's repetition when its autorepeat is disabled.

Erkki Seppälä erkki.seppala at vincit.fi
Fri Jan 21 05:56:22 PST 2011


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 at vincit.fi>
---
 xkb/xkb.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 7d95bc0..395f6fc 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;
-- 
1.7.0.4



More information about the xorg-devel mailing list