From e01116149b674bbd9b0ed241fc0106ca40bc7f52 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 23 Jan 2024 13:47:05 +0200 Subject: [PATCH] tests: Fix constraint region in pointerconstraints example --- tests/pointerconstraintstest.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"