diff --git a/autotests/client/test_selection.cpp b/autotests/client/test_selection.cpp --- a/autotests/client/test_selection.cpp +++ b/autotests/client/test_selection.cpp @@ -249,18 +249,16 @@ auto serverSurface2 = surfaceCreatedSpy.last().first().value(); QVERIFY(serverSurface2); - // entering that surface should give a selection + // entering that surface should give a selection offer m_seatInterface->setFocusedKeyboardSurface(serverSurface2); QVERIFY(selectionOfferedClient2Spy.wait()); QVERIFY(selectionClearedClient2Spy.isEmpty()); - // now unset the selection - m_client2.dataDevice->clearSelection(keyboardEnteredClient2Spy.first().first().value()); - QVERIFY(selectionClearedClient2Spy.wait()); + // set a data source but without offers QScopedPointer dataSource2(m_client2.ddm->createDataSource()); m_client2.dataDevice->setSelection(keyboardEnteredClient2Spy.first().first().value(), dataSource2.data()); QVERIFY(selectionOfferedClient2Spy.wait()); - // and clear again + // and clear m_client2.dataDevice->clearSelection(keyboardEnteredClient2Spy.first().first().value()); QVERIFY(selectionClearedClient2Spy.wait()); diff --git a/autotests/client/test_wayland_seat.cpp b/autotests/client/test_wayland_seat.cpp --- a/autotests/client/test_wayland_seat.cpp +++ b/autotests/client/test_wayland_seat.cpp @@ -461,19 +461,20 @@ m_seatInterface->relativePointerMotion(QSizeF(1, 2), QSizeF(3, 4), quint64(-1)); QVERIFY(relativeMotionSpy.wait()); QCOMPARE(relativeMotionSpy.count(), 1); + QCOMPARE(frameSpy.count(), 5); QCOMPARE(relativeMotionSpy.first().at(0).toSizeF(), QSizeF(1, 2)); QCOMPARE(relativeMotionSpy.first().at(1).toSizeF(), QSizeF(3, 4)); QCOMPARE(relativeMotionSpy.first().at(2).value(), quint64(-1)); // test axis m_seatInterface->setTimestamp(2); m_seatInterface->pointerAxis(Qt::Horizontal, 10); QVERIFY(axisSpy.wait()); - QCOMPARE(frameSpy.count(), 5); + QCOMPARE(frameSpy.count(), 6); m_seatInterface->setTimestamp(3); m_seatInterface->pointerAxis(Qt::Vertical, 20); QVERIFY(axisSpy.wait()); - QCOMPARE(frameSpy.count(), 6); + QCOMPARE(frameSpy.count(), 7); QCOMPARE(axisSpy.first().at(0).value(), quint32(2)); QCOMPARE(axisSpy.first().at(1).value(), Pointer::Axis::Horizontal); QCOMPARE(axisSpy.first().at(2).value(), qreal(10)); @@ -486,22 +487,22 @@ m_seatInterface->setTimestamp(4); m_seatInterface->pointerButtonPressed(1); QVERIFY(buttonSpy.wait()); - QCOMPARE(frameSpy.count(), 7); + QCOMPARE(frameSpy.count(), 8); QCOMPARE(buttonSpy.at(0).at(0).value(), m_display->serial()); m_seatInterface->setTimestamp(5); m_seatInterface->pointerButtonPressed(2); QVERIFY(buttonSpy.wait()); - QCOMPARE(frameSpy.count(), 8); + QCOMPARE(frameSpy.count(), 9); QCOMPARE(buttonSpy.at(1).at(0).value(), m_display->serial()); m_seatInterface->setTimestamp(6); m_seatInterface->pointerButtonReleased(2); QVERIFY(buttonSpy.wait()); - QCOMPARE(frameSpy.count(), 9); + QCOMPARE(frameSpy.count(), 10); QCOMPARE(buttonSpy.at(2).at(0).value(), m_display->serial()); m_seatInterface->setTimestamp(7); m_seatInterface->pointerButtonReleased(1); QVERIFY(buttonSpy.wait()); - QCOMPARE(frameSpy.count(), 10); + QCOMPARE(frameSpy.count(), 11); QCOMPARE(buttonSpy.count(), 4); // timestamp @@ -534,7 +535,7 @@ m_seatInterface->setFocusedPointerSurface(nullptr); QCOMPARE(focusedPointerChangedSpy.count(), 5); QVERIFY(leftSpy.wait()); - QCOMPARE(frameSpy.count(), 11); + QCOMPARE(frameSpy.count(), 12); QCOMPARE(leftSpy.first().first().value(), m_display->serial()); QVERIFY(!p->enteredSurface()); QVERIFY(!cp.enteredSurface()); @@ -547,7 +548,7 @@ m_seatInterface->setFocusedPointerSurface(serverSurface, QPoint(0, 0)); QCOMPARE(focusedPointerChangedSpy.count(), 6); QVERIFY(enteredSpy.wait()); - QCOMPARE(frameSpy.count(), 12); + QCOMPARE(frameSpy.count(), 13); QCOMPARE(p->enteredSurface(), s); QCOMPARE(cp.enteredSurface(), s);