From 69f1d7b3607bb088512420052b9e0d48e529772d Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 24 Oct 2022 18:36:31 +0100 Subject: Rework workspace rules --- src/managers/KeybindManager.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/managers/KeybindManager.cpp') 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(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 -- cgit v1.2.3