Scope bar interactions to their screen

This commit is contained in:
David Heinemeier Hansson
2026-05-20 15:15:16 +02:00
parent a69b64e1dd
commit 8703a46a70
2 changed files with 11 additions and 2 deletions
+1
View File
@@ -238,6 +238,7 @@ PanelWindow {
for (var i = targets.length - 1; i >= 0; i--) {
var target = targets[i]
if (!target || !target.triggerPress || target.visible === false || target.opacity === 0 || !target.mapToItem) continue
if (root.bar.targetBelongsToWindow && !root.bar.targetBelongsToWindow(target, root.anchorWindow)) continue
var pos = root.anchorWindow.itemPosition(target)
if (p.x >= pos.x && p.x <= pos.x + target.width && p.y >= pos.y && p.y <= pos.y + target.height) return target
}