summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-03 03:00:50 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-12-03 08:10:44 +0100
commiteae93ae4495fe9bfa4f8d1e6dfd03aee04ccc281 (patch)
tree8f8abacc14202b8a0ae0aebe577558dc4b6afd1e /tests
parent79a565fb7542ec154cacd0e95725d4d89dfc13e3 (diff)
parentce06115da6bf4c8d891ff0aa382dd2b1f5b4bf65 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/compositor/configure.json Change-Id: Id608424a63a4bcef4adb3f66d55a3cc32c86f2a2
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/client/seatv5/tst_seatv5.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/client/seatv5/tst_seatv5.cpp b/tests/auto/client/seatv5/tst_seatv5.cpp
index 636f26081..e333082ec 100644
--- a/tests/auto/client/seatv5/tst_seatv5.cpp
+++ b/tests/auto/client/seatv5/tst_seatv5.cpp
@@ -71,6 +71,7 @@ private slots:
void singleTapFloat();
void multiTouch();
void multiTouchUpAndMotionFrame();
+ void tapAndMoveInSameFrame();
};
void tst_seatv5::bindsToSeat()
@@ -586,5 +587,37 @@ void tst_seatv5::multiTouchUpAndMotionFrame()
QVERIFY(window.m_events.empty());
}
+void tst_seatv5::tapAndMoveInSameFrame()
+{
+ TouchWindow window;
+ QCOMPOSITOR_TRY_VERIFY(xdgSurface() && xdgSurface()->m_committedConfigureSerial);
+
+ exec([=] {
+ auto *t = touch();
+ auto *c = client();
+
+ t->sendDown(xdgToplevel()->surface(), {32, 32}, 0);
+ t->sendMotion(c, {33, 33}, 0);
+ t->sendFrame(c);
+
+ // Don't leave touch in a weird state
+ t->sendUp(c, 0);
+ t->sendFrame(c);
+ });
+
+ QTRY_VERIFY(!window.m_events.empty());
+ {
+ auto e = window.m_events.takeFirst();
+ QCOMPARE(e.type, QEvent::TouchBegin);
+ QCOMPARE(e.touchPoints.size(), 1);
+ QCOMPARE(e.touchPoints[0].state(), Qt::TouchPointState::TouchPointPressed);
+ // Position isn't that important, we just want to make sure we actually get the pressed event
+ }
+
+ // Make sure we eventually release
+ QTRY_VERIFY(!window.m_events.empty());
+ QTRY_COMPARE(window.m_events.last().touchPoints.first().state(), Qt::TouchPointState::TouchPointReleased);
+}
+
QCOMPOSITOR_TEST_MAIN(tst_seatv5)
#include "tst_seatv5.moc"