fix tooltip binding loop on _shown via assignedScreen mirror

This commit is contained in:
Damocles 2026-05-05 00:20:08 +02:00
parent 4f5cf5f5fa
commit d55753ab28
2 changed files with 7 additions and 1 deletions

View file

@ -11,8 +11,13 @@ PanelWindow {
visible: _winVisible visible: _winVisible
color: "transparent" color: "transparent"
// Mirror of `screen` captured at construction. Reading `root.screen`
// directly in `_shown` couples it to visibility transitions (PanelWindow
// re-evaluates `screen` when mapped/unmapped), which feeds back into
// `_shown` via `_winVisible` and trips a binding loop.
property var assignedScreen: null
property bool _winVisible: false property bool _winVisible: false
property bool _shown: M.TooltipState.visible && M.TooltipState.screen === root.screen property bool _shown: M.TooltipState.visible && M.TooltipState.screen === assignedScreen
on_ShownChanged: { on_ShownChanged: {
if (_shown) { if (_shown) {

View file

@ -33,6 +33,7 @@ ShellRoot {
Tooltip { Tooltip {
screen: scope.modelData screen: scope.modelData
assignedScreen: scope.modelData
} }
LazyLoader { LazyLoader {