summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qgesturerecognizer
diff options
context:
space:
mode:
authorTang Haixiang <tanghaixiang@uniontech.com>2021-06-18 14:29:01 +0800
committerShawn Rutledge <shawn.rutledge@qt.io>2022-05-20 10:26:18 +0200
commitefc02f9cc301f98c77079adae026ffd07f50d5ab (patch)
tree154031d1bde14a916e2d3f64ca9bfb757f987b93 /tests/auto/widgets/kernel/qgesturerecognizer
parent9af1f3557a60e37f8b7bafb921d265d322f1fc16 (diff)
xcb: Delete touch points without target windows
When XCB_INPUT_TOUCH_BEGIN closes a popup, we then receive XCB_INPUT_TOUCH_END, and cannot find a target window (because it's destroyed). If we don't deliver it, we need to at least clear the stored point from QPointingDevicePrivate::activePoints. Then when we deliver the next touch press, m_fakeMouseSourcePointId also needs to be reset. It's now even more paramount that autotests (and real-world touchscreens) must never omit any active touchpoint from a touch event. If a point doesn't move, it must be included in the QTouchEvent, with Stationary state. If not, QGuiApp::processTouchEvent() could generate multiple TouchBegin events in a row, which gets other bits of logic confused, here and there. Fixes: QTBUG-94557 Fixes: QTBUG-98519 Fixes: QTBUG-102751 Fixes: QTBUG-103706 Pick-to: 6.2 6.3 5.15 Change-Id: Ia95e410a2bb8bc7784aa5d296fac2b89e53a9f55 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel/qgesturerecognizer')
-rw-r--r--tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp b/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp
index 6d5282732a..87e0290473 100644
--- a/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp
+++ b/tests/auto/widgets/kernel/qgesturerecognizer/tst_qgesturerecognizer.cpp
@@ -269,7 +269,7 @@ void tst_QGestureRecognizer::swipeGesture()
// Press point #3
points.append(points.last() + fingerDistance);
- swipeSequence.press(points.size() - 1, points.last(), &widget);
+ swipeSequence.stationary(0).stationary(1).press(points.size() - 1, points.last(), &widget);
swipeSequence.commit();
Q_ASSERT(points.size() == swipePoints);