diff --git a/src/wayland/autotests/client/test_wayland_seat.cpp b/src/wayland/autotests/client/test_wayland_seat.cpp index 79cf64e83b..afdf17feeb 100644 --- a/src/wayland/autotests/client/test_wayland_seat.cpp +++ b/src/wayland/autotests/client/test_wayland_seat.cpp @@ -930,7 +930,6 @@ void TestWaylandSeat::testTouch() QSignalSpy touchCreatedSpy(m_seatInterface, SIGNAL(touchCreated(KWayland::Server::TouchInterface*))); QVERIFY(touchCreatedSpy.isValid()); Touch *touch = m_seat->createTouch(m_seat); - const Touch &ctouch = *touch; QVERIFY(touch->isValid()); QVERIFY(touchCreatedSpy.wait()); QVERIFY(m_seatInterface->focusedTouch()); @@ -1078,6 +1077,7 @@ void TestWaylandSeat::testTouch() QVERIFY(!m_seatInterface->isTouchSequence()); // try cancel + m_seatInterface->setFocusedTouchSurface(serverSurface, QPointF(15, 26)); m_seatInterface->setTimestamp(7); QCOMPARE(m_seatInterface->touchDown(QPointF(15, 26)), 0); m_seatInterface->touchFrame(); @@ -1090,6 +1090,7 @@ void TestWaylandSeat::testTouch() QCOMPARE(pointAddedSpy.count(), 2); QCOMPARE(pointMovedSpy.count(), 1); QCOMPARE(pointRemovedSpy.count(), 3); + QCOMPARE(touch->sequence().first()->position(), QPointF(0, 0)); } QTEST_GUILESS_MAIN(TestWaylandSeat) diff --git a/src/wayland/seat_interface.cpp b/src/wayland/seat_interface.cpp index 36eb264465..0cce9d9cda 100644 --- a/src/wayland/seat_interface.cpp +++ b/src/wayland/seat_interface.cpp @@ -820,6 +820,7 @@ void SeatInterface::setFocusedTouchSurface(SurfaceInterface *surface, const QPoi } d->touchInterface.focus = Private::Touch::Focus(); d->touchInterface.focus.surface = surface; + d->touchInterface.focus.offset = surfacePosition; TouchInterface *t = d->touchForSurface(surface); d->touchInterface.focus.touch = t; if (d->touchInterface.focus.surface) {