cmonitor: guard old workspace
This commit is contained in:
parent
1da0b2c02e
commit
70cfc7cc9c
1 changed files with 7 additions and 5 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue