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 <laszlo.agocs@digia.com>
This commit is contained in:
Giulio Camuffo 2014-09-27 22:00:14 +03:00
parent 222ed6ba7b
commit 12cc3e6f55

View File

@ -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(),