diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-28 00:07:35 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-28 00:07:35 +0800 |
| commit | 4c1c8afd643daac14e5692b7e0aff13f1ee4b181 (patch) | |
| tree | 8d1467efe8f88deefc6be74fa2ca628a8762e2a6 /bar | |
| parent | 2a0b49a58454a91cd4ad695643757dc4e80dfb0c (diff) | |
ws: fixed a issue where if you close the last pinned window, the workspace activerect won't react
tradeoff: monitor and updates activeoccupied whenever toplevel changes
Diffstat (limited to 'bar')
| -rw-r--r-- | bar/Workspace.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bar/Workspace.qml b/bar/Workspace.qml index ee6810b..f78cf1d 100644 --- a/bar/Workspace.qml +++ b/bar/Workspace.qml @@ -13,6 +13,8 @@ Item { implicitWidth: layout.implicitWidth property var ws: Hyprland.workspaces + property var toplevels: Hyprland.toplevels.values // update activeOccupied when toplevels changes as getWorkspaceStat's return is non reactive + property int activeIndex: -1 property bool activeOccupied: false property bool toChild: false @@ -32,6 +34,12 @@ Item { }; } + onToplevelsChanged: { + Qt.callLater(() => { + activeOccupied = getWorkspaceStats(activeIndex).isOccupied || false; + }); + } + DropShadow { anchors.fill: activeRect source: activeRect |
