diff options
| author | staz <alyystaz@gmail.com> | 2024-04-06 19:53:32 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-06 15:53:32 +0100 |
| commit | 1596e2d1f7db76c4a367a6beb814d79db019d8d2 (patch) | |
| tree | f16ca929542de890e66501417a88741393df4e3f /src/Compositor.cpp | |
| parent | 6cea710ac8e966366763b9609895dcef7fdb5bcb (diff) | |
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>
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index cdd1d15b..6c0025ea 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -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; } |
