diff --git a/modules/bar/popouts/ActiveWindow.qml b/modules/bar/popouts/ActiveWindow.qml index d9e9b9e9..547c019d 100644 --- a/modules/bar/popouts/ActiveWindow.qml +++ b/modules/bar/popouts/ActiveWindow.qml @@ -39,7 +39,7 @@ Item { ScreencopyView { id: preview - captureSource: ToplevelManager.toplevels.values.find(t => t.title === Hyprland.activeClient?.title) ?? null + captureSource: visible ? (ToplevelManager.toplevels.values.find(t => t.title === Hyprland.activeClient?.title) ?? null) : null live: true constraintSize.width: BarConfig.sizes.windowPreviewSize diff --git a/modules/bar/popouts/Wrapper.qml b/modules/bar/popouts/Wrapper.qml index 7782d903..0b6fba88 100644 --- a/modules/bar/popouts/Wrapper.qml +++ b/modules/bar/popouts/Wrapper.qml @@ -8,6 +8,8 @@ Item { required property ShellScreen screen + visible: width > 0 && height > 0 + implicitWidth: content.implicitWidth implicitHeight: content.implicitHeight + BorderConfig.rounding * 2