diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-09-30 21:32:44 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-09-30 23:17:50 +0200 |
commit | 871d19a5b96fa5a5be4ac50e3121e0704ff08374 (patch) | |
tree | 9f73926dae70696e4dd86ccbf4aaab6924dda3b2 /examples/widgets/tools/i18n | |
parent | 7ee682a1ddc259225618b57ff00f4c36ff5e724c (diff) |
Treat a double-click event as an update event with stationary point
The sequence is still press, release, press, double-click, release.
isBeginEvent() should not be true for a double-click event: the second
click began with a normal MouseButtonPress, and the MouseButtonDblClick
event is a way of sending updated state to tell the recipient that the
second click was special, occurring within such spatial and temporal
constraints that it can be interpreted as a double-click.
It never has a different position either, because MouseButtonDblClick
is a synthetic event occurring at the same position as the second press;
so we might as well say its QEventPoint is Stationary.
Together, these changes fix tst_controls::Basic::DelayButton::test_mouse
in Controls 2, without any changes in qtdeclarative.
In QQuickWindowPrivate::deliverPointerEvent(), if isBeginEvent() == true,
it delivers to all items under the point position(s) first, and then if
all _updated_ points were not accepted, it continues delivery to grabbers;
whereas if isBeginEvent() == false, it delivers only to grabbers.
isBeginEvent() and QEventPoint::state() are important to that algorithm.
Amends 6d6ed64d6ca27c1b5fec305e6ed9b923b5bb1037
Task-number: QTBUG-87018
Change-Id: I95def9704652147540df5cc065354a0fe04ed626
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/widgets/tools/i18n')
0 files changed, 0 insertions, 0 deletions