diff --git a/src/plugins/platforms/wayland/qwaylandcursor.cpp b/src/plugins/platforms/wayland/qwaylandcursor.cpp index 5a6ab44bc73..56caf05e2f1 100644 --- a/src/plugins/platforms/wayland/qwaylandcursor.cpp +++ b/src/plugins/platforms/wayland/qwaylandcursor.cpp @@ -270,7 +270,7 @@ void QWaylandCursor::changeCursor(QCursor *cursor, QWindow *window) void QWaylandCursor::pointerEvent(const QMouseEvent &event) { - mLastPos = event.globalPos(); + mLastPos = event.globalPosition().toPoint(); } QPoint QWaylandCursor::pos() const diff --git a/tests/auto/wayland/client/tst_client.cpp b/tests/auto/wayland/client/tst_client.cpp index 42e23b54ce9..ad63eca0a7d 100644 --- a/tests/auto/wayland/client/tst_client.cpp +++ b/tests/auto/wayland/client/tst_client.cpp @@ -81,7 +81,7 @@ public: void mousePressEvent(QMouseEvent *event) override { ++mousePressEventCount; - mousePressPos = event->pos(); + mousePressPos = event->position().toPoint(); } void mouseReleaseEvent(QMouseEvent *) override