mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-10 09:01:55 -07:00
core: match all workspace rules instead of the first one only (#5340)
This commit is contained in:
@@ -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)});
|
||||
|
Reference in New Issue
Block a user