tests: Fix constraint region in pointerconstraints example

wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent a1b47dfa08
commit e01116149b
  1. 4
      tests/pointerconstraintstest.qml

@ -167,8 +167,8 @@ ColumnLayout {
enabled: root.waylandNative && !fullWindowChck.checked enabled: root.waylandNative && !fullWindowChck.checked
function rect() { function rect() {
var globalPt = mapToGlobal(x, y); const scenePosition = mapToItem(null, x, y);
return Qt.rect(globalPt.x, globalPt.y, width, height); return Qt.rect(scenePosition.x, scenePosition.y, width, height);
} }
border.color: enabled ? "black" : "lightgrey" border.color: enabled ? "black" : "lightgrey"

Loading…
Cancel
Save