compositor: properly update workspace in moveWindowToWorkspaceSafe

fixes #5714
This commit is contained in:
Vaxry 2024-04-23 16:38:12 +01:00
parent a2366f78f0
commit bb4646bbdf

View file

@ -2700,11 +2700,9 @@ void CCompositor::moveWindowToWorkspaceSafe(CWindow* pWindow, PHLWORKSPACE pWork
if (FULLSCREEN) if (FULLSCREEN)
setWindowFullscreen(pWindow, false, FULLSCREEN_FULL); setWindowFullscreen(pWindow, false, FULLSCREEN_FULL);
pWindow->moveToWorkspace(pWorkspace);
if (!pWindow->m_bIsFloating) { if (!pWindow->m_bIsFloating) {
g_pLayoutManager->getCurrentLayout()->onWindowRemovedTiling(pWindow); g_pLayoutManager->getCurrentLayout()->onWindowRemovedTiling(pWindow);
pWindow->m_pWorkspace = pWorkspace; pWindow->moveToWorkspace(pWorkspace);
pWindow->m_iMonitorID = pWorkspace->m_iMonitorID; pWindow->m_iMonitorID = pWorkspace->m_iMonitorID;
g_pLayoutManager->getCurrentLayout()->onWindowCreatedTiling(pWindow); g_pLayoutManager->getCurrentLayout()->onWindowCreatedTiling(pWindow);
} else { } else {
@ -2713,7 +2711,7 @@ void CCompositor::moveWindowToWorkspaceSafe(CWindow* pWindow, PHLWORKSPACE pWork
const auto PWORKSPACEMONITOR = g_pCompositor->getMonitorFromID(pWorkspace->m_iMonitorID); const auto PWORKSPACEMONITOR = g_pCompositor->getMonitorFromID(pWorkspace->m_iMonitorID);
pWindow->m_pWorkspace = pWorkspace; pWindow->moveToWorkspace(pWorkspace);
pWindow->m_iMonitorID = pWorkspace->m_iMonitorID; pWindow->m_iMonitorID = pWorkspace->m_iMonitorID;
pWindow->m_vRealPosition = POSTOMON + PWORKSPACEMONITOR->vecPosition; pWindow->m_vRealPosition = POSTOMON + PWORKSPACEMONITOR->vecPosition;