workspacerules: add back on-created-empty functionality (#5452)

* workspacerules: add back on-created-empty functionality

* clang format

* workspacerules: spawn on-created-empty window while initializing CWorkspace

* clang format

* configManager: fix typo

---------

Co-authored-by: Your Name <you@example.com>
This commit is contained in:
staz
2024-04-06 19:53:32 +05:00
committed by GitHub
parent 6cea710ac8
commit 1596e2d1f7
5 changed files with 12 additions and 9 deletions

View File

@@ -1256,8 +1256,10 @@ PHLWORKSPACE CCompositor::getWorkspaceByID(const int& id) {
void CCompositor::sanityCheckWorkspaces() {
auto it = m_vWorkspaces.begin();
while (it != m_vWorkspaces.end()) {
const auto& WORKSPACE = *it;
// If ref == 1, only the compositor holds a ref, which means it's inactive and has no mapped windows.
if (!(*it)->m_bPersistent && it->use_count() == 1) {
if (!WORKSPACE->m_bPersistent && WORKSPACE.use_count() == 1) {
it = m_vWorkspaces.erase(it);
continue;
}