diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-10-24 18:36:31 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-10-24 18:36:31 +0100 |
| commit | 69f1d7b3607bb088512420052b9e0d48e529772d (patch) | |
| tree | c2e272ce748f90812abf2a1b0b6e322c43924d13 /src/managers/KeybindManager.cpp | |
| parent | e0bc952c8382992c2e9621865b94c904e728a8c3 (diff) | |
Rework workspace rules
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index fde07236..0f5c4faa 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -769,7 +769,7 @@ void CKeybindManager::changeworkspace(std::string args) { if (const auto POLDWORKSPACE = g_pCompositor->getWorkspaceByID(OLDWORKSPACE); POLDWORKSPACE) POLDWORKSPACE->startAnim(false, ANIMTOLEFT); - const auto PWORKSPACE = g_pCompositor->m_vWorkspaces.emplace_back(std::make_unique<CWorkspace>(PMONITOR->ID, workspaceName, workspaceToChangeTo == SPECIAL_WORKSPACE_ID)).get(); + const auto PWORKSPACE = g_pCompositor->createNewWorkspace(workspaceToChangeTo, PMONITOR->ID, workspaceName); if (!isSwitchingToPrevious) // Remember previous workspace. @@ -778,13 +778,6 @@ void CKeybindManager::changeworkspace(std::string args) { // start anim on new workspace PWORKSPACE->startAnim(true, ANIMTOLEFT); - // We are required to set the name here immediately - if (workspaceToChangeTo != SPECIAL_WORKSPACE_ID) - wlr_ext_workspace_handle_v1_set_name(PWORKSPACE->m_pWlrHandle, workspaceName.c_str()); - - PWORKSPACE->m_iID = workspaceToChangeTo; - PWORKSPACE->m_iMonitorID = PMONITOR->ID; - PMONITOR->specialWorkspaceOpen = false; // fix pinned windows |
