diff --git a/autotests/wayland/touch_input_test.cpp b/autotests/wayland/touch_input_test.cpp index 1de0d63444..3987395224 100644 --- a/autotests/wayland/touch_input_test.cpp +++ b/autotests/wayland/touch_input_test.cpp @@ -270,6 +270,8 @@ void TouchInputTest::testCancel() QVERIFY(sequenceStartedSpy.isValid()); QSignalSpy cancelSpy(m_touch, &Touch::sequenceCanceled); QVERIFY(cancelSpy.isValid()); + QSignalSpy pointRemovedSpy(m_touch, &Touch::pointRemoved); + QVERIFY(pointRemovedSpy.isValid()); quint32 timestamp = 1; waylandServer()->backend()->touchDown(1, QPointF(125, 125), timestamp++); @@ -280,6 +282,10 @@ void TouchInputTest::testCancel() waylandServer()->backend()->touchCancel(); QVERIFY(cancelSpy.wait()); QCOMPARE(cancelSpy.count(), 1); + + waylandServer()->backend()->touchUp(1, timestamp++); + QVERIFY(!pointRemovedSpy.wait(100)); + QCOMPARE(pointRemovedSpy.count(), 0); } } diff --git a/input.cpp b/input.cpp index 622b7f3dc1..0791d871b2 100644 --- a/input.cpp +++ b/input.cpp @@ -1397,6 +1397,7 @@ void InputRedirection::cancelTouch() if (auto seat = findSeat()) { seat->cancelTouchSequence(); } + m_touchIdMapper.clear(); } void InputRedirection::touchFrame()