diff options
author | David Edmundson <davidedmundson@kde.org> | 2019-09-07 11:41:49 +0200 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2019-09-08 08:11:46 +0000 |
commit | 195c8c22d6111150f2135c68a6d5d62adccfd844 (patch) | |
tree | 04eb58f00b8f07799274e296da9f0674bdb840a9 | |
parent | 53ab5e7748340f922f7f32c7d2db4965aa8c2ff2 (diff) |
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 <johan.helsing@qt.io>
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |