From 12cc3e6f55ea953b59162a1fa6f65fbcc4b3cd63 Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Sat, 27 Sep 2014 22:00:14 +0300 Subject: [PATCH] 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: Laszlo Agocs --- .../platforms/wayland/qwaylandinputdevice.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index 5198a9e31ea..6ec7b5df411 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp @@ -817,6 +817,18 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time, void QWaylandInputDevice::repeatKey() { 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(), mKeyboard->mRepeatTime, QEvent::KeyPress, mKeyboard->mRepeatKey, modifiers(),