mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-26 09:41:57 -07:00
cmonitor: guard old workspace
This commit is contained in:
@@ -1019,15 +1019,17 @@ void CMonitor::changeWorkspace(const PHLWORKSPACE& pWorkspace, bool internal, bo
|
|||||||
if (pWorkspace == activeWorkspace)
|
if (pWorkspace == activeWorkspace)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto POLDWORKSPACE = activeWorkspace;
|
const auto POLDWORKSPACE = activeWorkspace;
|
||||||
POLDWORKSPACE->m_bVisible = false;
|
if (POLDWORKSPACE)
|
||||||
pWorkspace->m_bVisible = true;
|
POLDWORKSPACE->m_bVisible = false;
|
||||||
|
pWorkspace->m_bVisible = true;
|
||||||
|
|
||||||
activeWorkspace = pWorkspace;
|
activeWorkspace = pWorkspace;
|
||||||
|
|
||||||
if (!internal) {
|
if (!internal) {
|
||||||
const auto ANIMTOLEFT = pWorkspace->m_iID > POLDWORKSPACE->m_iID;
|
const auto ANIMTOLEFT = POLDWORKSPACE && pWorkspace->m_iID > POLDWORKSPACE->m_iID;
|
||||||
POLDWORKSPACE->startAnim(false, ANIMTOLEFT);
|
if (POLDWORKSPACE)
|
||||||
|
POLDWORKSPACE->startAnim(false, ANIMTOLEFT);
|
||||||
pWorkspace->startAnim(true, ANIMTOLEFT);
|
pWorkspace->startAnim(true, ANIMTOLEFT);
|
||||||
|
|
||||||
// move pinned windows
|
// move pinned windows
|
||||||
|
Reference in New Issue
Block a user