diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-12-09 11:06:18 +0100 |
---|---|---|
committer | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-12-17 09:30:48 +0100 |
commit | 80ed5501cf5dcc4b6ef2a1a126d9d564c1c73851 (patch) | |
tree | 1f9d28ea11e4813ad76bbd8acf785320953ea9f5 /src | |
parent | 99daf1ce6f328ed5419df93e5dc7e02e31d54be9 (diff) | |
download | qtwayland-80ed5501cf5dcc4b6ef2a1a126d9d564c1c73851.tar.gz |
Client: Fix inverse repeat rate implementation
The rate from wl_keyboard.repeat_info was used as if it was an interval. Fixed
by converting from key strokes per second to milliseconds per key stroke.
This fixes a regression, as repeat rate used to be hard-coded to something
sensible before.
[ChangeLog][QPA plugin] Fixed keyboard repeat rate being set inversely, so
higher rates would actually result in fewer characters per second, and vice
versa.
Fixes: QTBUG-80613
Change-Id: Ie783b90cba13dde6f37c0cd1be584d352cddfe7c
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src')
-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 d812918e..3b26dc42 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -88,7 +88,7 @@ QWaylandInputDevice::Keyboard::Keyboard(QWaylandInputDevice *p) // or the server didn't send an enter event first. return; } - mRepeatTimer.setInterval(mRepeatRate); + mRepeatTimer.setInterval(1000 / mRepeatRate); handleKey(mRepeatKey.time, QEvent::KeyRelease, mRepeatKey.key, mRepeatKey.modifiers, mRepeatKey.code, mRepeatKey.nativeVirtualKey, mRepeatKey.nativeModifiers, mRepeatKey.text, true); |