Rework workspace rules
This commit is contained in:
parent
e0bc952c83
commit
69f1d7b360
4 changed files with 58 additions and 37 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue