Commit 5f718c7d authored by Giulio Camuffo's avatar Giulio Camuffo
Browse files

Send also repeat key release events


We were sending only key press events for the key autorepeat, going
out of sync with the release events. Xorg sends both relase and press
auto repeat events, do so here too.

Change-Id: I41a9bfaff50afea779a7572220f6a01b507e95ac
Reviewed-by: default avatarLaszlo Agocs <laszlo.agocs@digia.com>
Showing with 12 additions and 0 deletions
...@@ -817,6 +817,18 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time, ...@@ -817,6 +817,18 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time,
void QWaylandInputDevice::repeatKey() void QWaylandInputDevice::repeatKey()
{ {
mRepeatTimer.setInterval(25); mRepeatTimer.setInterval(25);
QWindowSystemInterface::handleExtendedKeyEvent(mKeyboard->mFocus->window(),
mKeyboard->mRepeatTime, QEvent::KeyRelease, mKeyboard->mRepeatKey,
modifiers(),
mKeyboard->mRepeatCode,
#ifndef QT_NO_WAYLAND_XKB
mKeyboard->mRepeatSym, mKeyboard->mNativeModifiers,
#else
0, 0,
#endif
mKeyboard->mRepeatText, true);
QWindowSystemInterface::handleExtendedKeyEvent(mKeyboard->mFocus->window(), QWindowSystemInterface::handleExtendedKeyEvent(mKeyboard->mFocus->window(),
mKeyboard->mRepeatTime, QEvent::KeyPress, mKeyboard->mRepeatKey, mKeyboard->mRepeatTime, QEvent::KeyPress, mKeyboard->mRepeatKey,
modifiers(), modifiers(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment