diff --git a/tests/pointerconstraintstest.qml b/tests/pointerconstraintstest.qml index 7f8c8b4e13..c6eb426698 100644 --- a/tests/pointerconstraintstest.qml +++ b/tests/pointerconstraintstest.qml @@ -167,8 +167,8 @@ ColumnLayout { enabled: root.waylandNative && !fullWindowChck.checked function rect() { - var globalPt = mapToGlobal(x, y); - return Qt.rect(globalPt.x, globalPt.y, width, height); + const scenePosition = mapToItem(null, x, y); + return Qt.rect(scenePosition.x, scenePosition.y, width, height); } border.color: enabled ? "black" : "lightgrey"