From 5e8c25d498ed5cb7852ae74a876b0c138a62d59d Mon Sep 17 00:00:00 2001 From: thejch <66577496+thejch@users.noreply.github.com> Date: Sat, 30 Mar 2024 17:49:53 -0700 Subject: core: match all workspace rules instead of the first one only (#5340) --- src/desktop/Workspace.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/desktop/Workspace.cpp') diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp index 440afc56..05843b59 100644 --- a/src/desktop/Workspace.cpp +++ b/src/desktop/Workspace.cpp @@ -24,9 +24,11 @@ CWorkspace::CWorkspace(int id, int monitorID, std::string name, bool special) { m_vRenderOffset.registerVar(); m_fAlpha.registerVar(); - const auto RULEFORTHIS = g_pConfigManager->getWorkspaceRuleFor(this); - if (RULEFORTHIS.defaultName.has_value()) - m_szName = RULEFORTHIS.defaultName.value(); + const auto RULESFORTHIS = g_pConfigManager->getWorkspaceRulesFor(this); + for (auto& rule : RULESFORTHIS) { + if (rule.defaultName.has_value()) + m_szName = rule.defaultName.value(); + } g_pEventManager->postEvent({"createworkspace", m_szName}); g_pEventManager->postEvent({"createworkspacev2", std::format("{},{}", m_iID, m_szName)}); -- cgit v1.2.3