Add 'empty' css class to special workspaces

This commit is contained in:
Jannik 2024-02-10 16:59:53 +01:00
parent d4331ce7fe
commit 240b49f9d2
No known key found for this signature in database
1 changed files with 4 additions and 1 deletions

View File

@ -486,7 +486,10 @@ void Workspaces::updateWindowCount() {
for (auto &workspace : m_workspaces) { for (auto &workspace : m_workspaces) {
auto workspaceJson = std::find_if( auto workspaceJson = std::find_if(
workspacesJson.begin(), workspacesJson.end(), workspacesJson.begin(), workspacesJson.end(),
[&](Json::Value const &x) { return x["name"].asString() == workspace->name(); }); [&](Json::Value const &x) {
return x["name"].asString() == workspace->name() ||
(workspace->isSpecial() && x["name"].asString() == "special:" + workspace->name());
});
uint32_t count = 0; uint32_t count = 0;
if (workspaceJson != workspacesJson.end()) { if (workspaceJson != workspacesJson.end()) {
try { try {