diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-08-04 00:47:14 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-08-16 04:43:56 +0000 |
commit | 21f976f4f0f79b1c4c77a402ebed88d8afb3d9e1 (patch) | |
tree | 7590aab440e29c593797cd33008e60c86608fe7d /mkspecs/features | |
parent | 32e21762fa58be2459c43fe17ec87bd302d04d59 (diff) |
xcb: rewrite auto-repeat key detection logic
It's unclear what the original code was doing. It relied on 'm_release'
which could never be 'false' (ref. QTBUG-69679). It was subtracting event
times and comparing with arbitrary '10'. On X11 auto-repeat keys can be
detected by checking time and keycode of the current release event and
the next event in the queue. If an event is an auto-repeat, then next event
in the queue will be a key press with matching time and keycode.
Verified that auto-repeat was unreliable in Qt 4 as well. With this patch
auto-repeat works as expected.
Added support for Xlib's XPeekEvent in our XCB implementation QXcbConnection::checkEvent():
"The XPeekEvent() function returns the first event from the event queue,
but it does not remove the event from the queue."
Sneaking in one variable renaming: "string" -> "text", to match the QKeyEvent::text().
Task-number: QTBUG-57335
Task-number: QTBUG-69679
Change-Id: I0a23f138287f57eaaecf1a009bd939e7e0e23269
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'mkspecs/features')
0 files changed, 0 insertions, 0 deletions