diff options
author | thejch <[email protected]> | 2024-03-30 17:49:53 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-31 00:49:53 +0000 |
commit | 5e8c25d498ed5cb7852ae74a876b0c138a62d59d (patch) | |
tree | 904e8d5f5c9fa10e540b02d229f0f3a83f3dfc0a /src/desktop/Workspace.cpp | |
parent | 1aed45f61d2dd48943a63cabf7bd77c19a59cf62 (diff) | |
download | Hyprland-5e8c25d498ed5cb7852ae74a876b0c138a62d59d.tar.gz Hyprland-5e8c25d498ed5cb7852ae74a876b0c138a62d59d.zip |
core: match all workspace rules instead of the first one only (#5340)
Diffstat (limited to 'src/desktop/Workspace.cpp')
-rw-r--r-- | src/desktop/Workspace.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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)}); |