diff options
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 30e769e3..3ac9a73f 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1260,8 +1260,13 @@ void CCompositor::sanityCheckWorkspaces() { auto it = m_vWorkspaces.begin(); while (it != m_vWorkspaces.end()) { - const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(it->get()); - if (WORKSPACERULE.isPersistent) { + const auto WORKSPACERULES = g_pConfigManager->getWorkspaceRulesFor(it->get()); + bool isPersistent = false; + for (auto& wsRule : WORKSPACERULES) { + if (wsRule.isPersistent) + isPersistent = true; + } + if (isPersistent) { ++it; continue; } @@ -1288,8 +1293,10 @@ void CCompositor::sanityCheckWorkspaces() { continue; } if (!WORKSPACE->m_bOnCreatedEmptyExecuted) { - if (auto cmd = WORKSPACERULE.onCreatedEmptyRunCmd) - g_pKeybindManager->spawn(*cmd); + for (auto& wsRule : WORKSPACERULES) { + if (auto cmd = wsRule.onCreatedEmptyRunCmd) + g_pKeybindManager->spawn(*cmd); + } WORKSPACE->m_bOnCreatedEmptyExecuted = true; } |
