diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-03-08 15:42:42 +1000 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-04-15 16:20:04 -0400 |
commit | f9b5bbaa3a7fce1a4efb2084b8d9d82b98d4ee83 (patch) | |
tree | 6074b366cfa61b80a8e3be1634edf97a83a4049a /xkb | |
parent | a6288f0954cf97499e78849a87847062ee962c17 (diff) |
xkb: fix SlowKeys release/reject beeps
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@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbAccessX.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 02e820b2d..892cb3097 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) |