workspacerules: fix on-created-empty window focus (#7657)

This commit is contained in:
Sungyoon Cho
2024-09-06 08:54:01 +09:00
committed by GitHub
parent 727f1b54cd
commit 0fad7a0bb0
3 changed files with 23 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ void CWorkspace::init(PHLWORKSPACE self) {
if (self->m_bWasCreatedEmpty)
if (auto cmd = WORKSPACERULE.onCreatedEmptyRunCmd)
g_pKeybindManager->spawn(*cmd);
g_pKeybindManager->spawnWithRules(*cmd, self);
g_pEventManager->postEvent({"createworkspace", m_szName});
g_pEventManager->postEvent({"createworkspacev2", std::format("{},{}", m_iID, m_szName)});