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>
This commit is contained in:
parent
2f1b67c17b
commit
fbc93070ad
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user