diff options
author | Giulio Camuffo <giuliocamuffo@gmail.com> | 2013-12-26 16:27:49 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-30 14:29:44 +0100 |
commit | 437b7907f3f5c4ff2c3433a8d0cd4afa86b67fdf (patch) | |
tree | a3296f9b3cba05c874c880a96dfc8854b1880066 | |
parent | b6713ec4262c05f7d103bc3b75ab81aedc690853 (diff) | |
download | qtwayland-437b7907f3f5c4ff2c3433a8d0cd4afa86b67fdf.tar.gz qtwayland-437b7907f3f5c4ff2c3433a8d0cd4afa86b67fdf.tar.bz2 qtwayland-437b7907f3f5c4ff2c3433a8d0cd4afa86b67fdf.zip |
Improve key auto repeat behavior.
Keep the repeat timer running when a key release is received if it
is relative to another key.
Make the repeat send the modifiers too.
Change-Id: I7438502bf50cbe60d56b14bab17aa394367406cf
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index 81bb0703..0f0a6587 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -638,7 +638,7 @@ void QWaylandInputDevice::keyboard_key(uint32_t serial, uint32_t time, uint32_t mRepeatText = text; mRepeatTimer.setInterval(400); mRepeatTimer.start(); - } else { + } else if (mRepeatCode == code) { mRepeatTimer.stop(); } } @@ -648,7 +648,7 @@ void QWaylandInputDevice::repeatKey() mRepeatTimer.setInterval(25); QWindowSystemInterface::handleExtendedKeyEvent(mKeyboardFocus->window(), mRepeatTime, QEvent::KeyPress, mRepeatKey, - Qt::NoModifier, + modifiers(), mRepeatCode, 0, 0, mRepeatText); } |