diff options
author | Andre de la Rocha <andre.rocha@qt.io> | 2020-07-18 01:52:49 -0300 |
---|---|---|
committer | Andre de la Rocha <andre.rocha@qt.io> | 2020-08-18 03:26:31 -0300 |
commit | 44112d36c86149f41446bec72c38f82981ff6be6 (patch) | |
tree | c9b8e29e6f513fb06c4b9c144e283e168383560c /tests/auto/widgets | |
parent | f77bdd8d85e77aa1e3a87d6b04375d05f0bbad28 (diff) |
Discard extra mouse move event generated by touchpad
On Windows, and possibly other platforms, a touchpad can send a mouse
button press followed by an unexpected mouse move event to the same
coordinates, before sending a mouse button release, which may confuse
applications. Before the enhanced mouse event processing was added, the
code in QGuiApplication was responsible for deducing the mouse event
type and other info, and in the process performed a checking that
discarded events that did not change state. The enhanced mouse
processing code lacked this checking. This change adds an equivalent
checking to the enhanced mouse event processing.
Fixes: QTBUG-85431
Change-Id: Ie3e2ae8cbf9870d465dfd2c8808942dd6fc647d2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit b50daef9771d8829fc7f808898cbe051a5464b79)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r-- | tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index c934f8e27b..32a14102fd 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -3314,6 +3314,7 @@ void tst_QComboBox::task_QTBUG_49831_scrollerNotActivated() if (scroller->isVisible()) { QSignalSpy doScrollSpy(scroller, SIGNAL(doScroll(int))); QTest::mouseMove(scroller, QPoint(5, 5), 500); + QTest::mouseMove(scroller, QPoint(6, 5), 500); QTRY_VERIFY(doScrollSpy.count() > 0); } } |