core: fix visibility flags in moveWorkspaceToMonitor

fixes #5416
This commit is contained in:
Vaxry 2024-04-04 18:30:32 +01:00
parent c4b660a339
commit cba9c5ff95

View file

@ -2250,14 +2250,17 @@ void CCompositor::moveWorkspaceToMonitor(PHLWORKSPACE pWorkspace, CMonitor* pMon
if (SWITCHINGISACTIVE && POLDMON == g_pCompositor->m_pLastMonitor) { // if it was active, preserve its' status. If it wasn't, don't. if (SWITCHINGISACTIVE && POLDMON == g_pCompositor->m_pLastMonitor) { // if it was active, preserve its' status. If it wasn't, don't.
Debug::log(LOG, "moveWorkspaceToMonitor: SWITCHINGISACTIVE, active {} -> {}", pMonitor->activeWorkspaceID(), pWorkspace->m_iID); Debug::log(LOG, "moveWorkspaceToMonitor: SWITCHINGISACTIVE, active {} -> {}", pMonitor->activeWorkspaceID(), pWorkspace->m_iID);
if (valid(pMonitor->activeWorkspace)) if (valid(pMonitor->activeWorkspace)) {
pMonitor->activeWorkspace->m_bVisible = false;
pMonitor->activeWorkspace->startAnim(false, false); pMonitor->activeWorkspace->startAnim(false, false);
}
setActiveMonitor(pMonitor); setActiveMonitor(pMonitor);
pMonitor->activeWorkspace = pWorkspace; pMonitor->activeWorkspace = pWorkspace;
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(pMonitor->ID); g_pLayoutManager->getCurrentLayout()->recalculateMonitor(pMonitor->ID);
pWorkspace->startAnim(true, true, true); pWorkspace->startAnim(true, true, true);
pWorkspace->m_bVisible = true;
if (!noWarpCursor) if (!noWarpCursor)
wlr_cursor_warp(m_sWLRCursor, nullptr, pMonitor->vecPosition.x + pMonitor->vecTransformedSize.x / 2, pMonitor->vecPosition.y + pMonitor->vecTransformedSize.y / 2); wlr_cursor_warp(m_sWLRCursor, nullptr, pMonitor->vecPosition.x + pMonitor->vecTransformedSize.x / 2, pMonitor->vecPosition.y + pMonitor->vecTransformedSize.y / 2);