fix empty workspace name on unspecified default

This commit is contained in:
vaxerski 2022-07-27 13:56:01 +02:00
parent c9c4b14ef2
commit 427bc35b6b
1 changed files with 4 additions and 0 deletions

View File

@ -81,6 +81,10 @@ void CMonitor::onConnect(bool noRule) {
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(ID);
PNEWWORKSPACE->startAnim(true, true, true);
} else {
if (newDefaultWorkspaceName == "")
newDefaultWorkspaceName = std::to_string(WORKSPACEID);
PNEWWORKSPACE = g_pCompositor->m_vWorkspaces.emplace_back(std::make_unique<CWorkspace>(ID, newDefaultWorkspaceName)).get();
// We are required to set the name here immediately