From 5bd740abe70dbf061c21971902eb442681d2b1e9 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 3 Jun 2025 13:29:11 +0800 Subject: bar: save cpu usage Stop window preview when not visible --- modules/bar/popouts/ActiveWindow.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/bar/popouts/ActiveWindow.qml') diff --git a/modules/bar/popouts/ActiveWindow.qml b/modules/bar/popouts/ActiveWindow.qml index d9e9b9e..547c019 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 -- cgit v1.2.3-freya