diff --git a/shell/Ui/KeyboardPanel.qml b/shell/Ui/KeyboardPanel.qml index 3fbdc9ee..fc7f0d96 100644 --- a/shell/Ui/KeyboardPanel.qml +++ b/shell/Ui/KeyboardPanel.qml @@ -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 } diff --git a/shell/plugins/bar/Bar.qml b/shell/plugins/bar/Bar.qml index 15332a52..5ced9a60 100644 --- a/shell/plugins/bar/Bar.qml +++ b/shell/plugins/bar/Bar.qml @@ -93,6 +93,14 @@ Item { clickTargets = next } + function targetWindow(target) { + return target && target.QsWindow ? target.QsWindow.window : null + } + + function targetBelongsToWindow(target, window) { + return !!target && !!window && targetWindow(target) === window + } + function requestPopout(owner) { if (activePopout === owner) return if (activePopout && "close" in activePopout) activePopout.close() @@ -584,7 +592,7 @@ Item { PopupWindow { id: tooltipWindow - visible: root.tooltipShown && root.tooltipTarget !== null && root.tooltipText !== "" + visible: root.tooltipShown && root.tooltipTarget !== null && root.tooltipText !== "" && root.targetBelongsToWindow(root.tooltipTarget, barWindow) color: "transparent" implicitWidth: Math.ceil(tooltipBubble.implicitWidth) implicitHeight: Math.ceil(tooltipBubble.implicitHeight) @@ -600,7 +608,7 @@ Item { onAnchoring: { var target = root.tooltipTarget - if (!target) return + if (!root.targetBelongsToWindow(target, barWindow)) return var popupWidth = tooltipWindow.implicitWidth var popupHeight = tooltipWindow.implicitHeight