From 195c8c22d6111150f2135c68a6d5d62adccfd844 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Sat, 7 Sep 2019 11:41:49 +0200 Subject: Client: Disable key repeating when rate is set to 0 From the docs of repeat_info: "A rate of zero will disable any repeating (regardless of the value of delay)." Avoiding starting the initial timer effectively disables everything Change-Id: I7489f61b2bc0e000efddb4255f1968072eeff2b8 Reviewed-by: Johan Helsing --- src/client/qwaylandinputdevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index b5c18a074..9ceb222d9 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -896,7 +896,7 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time, QEvent::Type type = isDown ? QEvent::KeyPress : QEvent::KeyRelease; handleKey(time, type, qtkey, modifiers, code, sym, mNativeModifiers, text); - if (state == WL_KEYBOARD_KEY_STATE_PRESSED && xkb_keymap_key_repeats(mXkbKeymap.get(), code)) { + if (state == WL_KEYBOARD_KEY_STATE_PRESSED && xkb_keymap_key_repeats(mXkbKeymap.get(), code) && mRepeatRate > 0) { mRepeatKey.key = qtkey; mRepeatKey.code = code; mRepeatKey.time = time; -- cgit v1.2.3