config: add defaultName for workspace rules

alas, fixes #665
This commit is contained in:
Vaxry 2024-02-27 22:44:42 +00:00
parent e2c286548d
commit f26d7aa58d
3 changed files with 7 additions and 0 deletions

View file

@ -24,6 +24,10 @@ CWorkspace::CWorkspace(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();
g_pEventManager->postEvent({"createworkspace", m_szName});
EMIT_HOOK_EVENT("createWorkspace", this);
}