[PATCH xserver] xkb: fix SlowKeys release/reject beeps
Peter Hutterer
peter.hutterer at who-t.net
Tue Mar 8 05:42:42 UTC 2016
Wrong use of the mask here caused a beep whenever a key was rejected but also
when it was released after being accepted. Fix the mask to check for the
correct enabled controls.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
xkb/xkbAccessX.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 02e820b..892cb30 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -618,6 +618,7 @@ AccessXFilterReleaseEvent(DeviceEvent *event, DeviceIntPtr keybd)
if (ctrls->enabled_ctrls & XkbSlowKeysMask) {
xkbAccessXNotify ev;
unsigned beep_type;
+ unsigned mask;
ev.keycode = key;
ev.slowKeysDelay = ctrls->slow_keys_delay;
@@ -625,14 +626,16 @@ AccessXFilterReleaseEvent(DeviceEvent *event, DeviceIntPtr keybd)
if (BitIsOn(keybd->key->down, key) || (xkbi->mouseKey == key)) {
ev.detail = XkbAXN_SKRelease;
beep_type = _BEEP_SLOW_RELEASE;
+ mask = XkbAX_SKReleaseFBMask;
}
else {
ev.detail = XkbAXN_SKReject;
beep_type = _BEEP_SLOW_REJECT;
+ mask = XkbAX_SKRejectFBMask;
ignoreKeyEvent = TRUE;
}
XkbSendAccessXNotify(keybd, &ev);
- if (XkbAX_NeedFeedback(ctrls, XkbAX_SKRejectFBMask)) {
+ if (XkbAX_NeedFeedback(ctrls, mask)) {
XkbDDXAccessXBeep(keybd, beep_type, XkbSlowKeysMask);
}
if (xkbi->slowKey == key)
--
2.5.0
More information about the xorg-devel
mailing list