diff --git a/autotests/integration/touch_input_test.cpp b/autotests/integration/touch_input_test.cpp index c63643c13c..c81c1fb70e 100644 --- a/autotests/integration/touch_input_test.cpp +++ b/autotests/integration/touch_input_test.cpp @@ -161,7 +161,6 @@ void TouchInputTest::testMultipleTouchPoints() QCOMPARE(sequenceStartedSpy.count(), 1); QCOMPARE(m_touch->sequence().count(), 1); QCOMPARE(m_touch->sequence().first()->isDown(), true); - QEXPECT_FAIL("decorated", "BUG 374778", Continue); QCOMPARE(m_touch->sequence().first()->position(), QPointF(25, 25)); QCOMPARE(pointAddedSpy.count(), 0); QCOMPARE(pointMovedSpy.count(), 0); @@ -172,7 +171,6 @@ void TouchInputTest::testMultipleTouchPoints() QCOMPARE(pointAddedSpy.count(), 1); QCOMPARE(m_touch->sequence().count(), 2); QCOMPARE(m_touch->sequence().at(1)->isDown(), true); - QEXPECT_FAIL("decorated", "BUG 374778", Continue); QCOMPARE(m_touch->sequence().at(1)->position(), QPointF(-100, -100)); QCOMPARE(pointMovedSpy.count(), 0); @@ -182,7 +180,6 @@ void TouchInputTest::testMultipleTouchPoints() QCOMPARE(pointMovedSpy.count(), 1); QCOMPARE(m_touch->sequence().count(), 2); QCOMPARE(m_touch->sequence().at(1)->isDown(), true); - QEXPECT_FAIL("decorated", "BUG 374778", Continue); QCOMPARE(m_touch->sequence().at(1)->position(), QPointF(0, 0)); kwinApp()->platform()->touchUp(1, timestamp++); diff --git a/touch_input.cpp b/touch_input.cpp index 1f5894a063..c28f6c5894 100644 --- a/touch_input.cpp +++ b/touch_input.cpp @@ -102,7 +102,8 @@ void TouchInputRedirection::update(const QPointF &pos) m_windowGeometryConnection = QMetaObject::Connection(); } if (t && t->surface()) { - seat->setFocusedTouchSurface(t->surface(), t->pos()); + // FIXME: add input transformation API to KWayland::Server::SeatInterface for touch input + seat->setFocusedTouchSurface(t->surface(), -1 * t->inputTransformation().map(t->pos()) + t->pos()); m_windowGeometryConnection = connect(t, &Toplevel::geometryChanged, this, [this] { if (m_window.isNull()) { @@ -112,7 +113,8 @@ void TouchInputRedirection::update(const QPointF &pos) if (m_window.data()->surface() != seat->focusedTouchSurface()) { return; } - seat->setFocusedTouchSurfacePosition(m_window.data()->pos()); + auto t = m_window.data(); + seat->setFocusedTouchSurfacePosition(-1 * t->inputTransformation().map(t->pos()) + t->pos()); } ); } else {