bar: save cpu usage
Stop window preview when not visible
This commit is contained in:
parent
4f816e0abf
commit
5bd740abe7
2 changed files with 3 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ Item {
|
||||||
ScreencopyView {
|
ScreencopyView {
|
||||||
id: preview
|
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
|
live: true
|
||||||
|
|
||||||
constraintSize.width: BarConfig.sizes.windowPreviewSize
|
constraintSize.width: BarConfig.sizes.windowPreviewSize
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ Item {
|
||||||
|
|
||||||
required property ShellScreen screen
|
required property ShellScreen screen
|
||||||
|
|
||||||
|
visible: width > 0 && height > 0
|
||||||
|
|
||||||
implicitWidth: content.implicitWidth
|
implicitWidth: content.implicitWidth
|
||||||
implicitHeight: content.implicitHeight + BorderConfig.rounding * 2
|
implicitHeight: content.implicitHeight + BorderConfig.rounding * 2
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue