From bb4646bbdf7d3490c2442347d852a62470aec2aa Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 23 Apr 2024 16:38:12 +0100 Subject: [PATCH] compositor: properly update workspace in moveWindowToWorkspaceSafe fixes #5714 --- src/Compositor.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 4df5d2e2..42cc4043 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2700,11 +2700,9 @@ void CCompositor::moveWindowToWorkspaceSafe(CWindow* pWindow, PHLWORKSPACE pWork if (FULLSCREEN) setWindowFullscreen(pWindow, false, FULLSCREEN_FULL); - pWindow->moveToWorkspace(pWorkspace); - if (!pWindow->m_bIsFloating) { g_pLayoutManager->getCurrentLayout()->onWindowRemovedTiling(pWindow); - pWindow->m_pWorkspace = pWorkspace; + pWindow->moveToWorkspace(pWorkspace); pWindow->m_iMonitorID = pWorkspace->m_iMonitorID; g_pLayoutManager->getCurrentLayout()->onWindowCreatedTiling(pWindow); } else { @@ -2713,7 +2711,7 @@ void CCompositor::moveWindowToWorkspaceSafe(CWindow* pWindow, PHLWORKSPACE pWork const auto PWORKSPACEMONITOR = g_pCompositor->getMonitorFromID(pWorkspace->m_iMonitorID); - pWindow->m_pWorkspace = pWorkspace; + pWindow->moveToWorkspace(pWorkspace); pWindow->m_iMonitorID = pWorkspace->m_iMonitorID; pWindow->m_vRealPosition = POSTOMON + PWORKSPACEMONITOR->vecPosition;