Keep fullscreen mode in moveWindowToWorkspaceSafe (#2191)

Moving a maximised window would always result in the window being
fullscreen instead of maximised
This commit is contained in:
scorpion-26 2023-04-30 00:39:09 +02:00 committed by GitHub
parent 5c3684d0cc
commit fdb772832f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2348,7 +2348,8 @@ void CCompositor::moveWindowToWorkspaceSafe(CWindow* pWindow, CWorkspace* pWorks
if (!pWindow || !pWorkspace)
return;
const bool FULLSCREEN = pWindow->m_bIsFullscreen;
const bool FULLSCREEN = pWindow->m_bIsFullscreen;
const auto FULLSCREENMODE = getWorkspaceByID(pWindow->m_iWorkspaceID)->m_efFullscreenMode;
if (FULLSCREEN)
setWindowFullscreen(pWindow, false, FULLSCREEN_FULL);
@ -2374,5 +2375,5 @@ void CCompositor::moveWindowToWorkspaceSafe(CWindow* pWindow, CWorkspace* pWorks
}
if (FULLSCREEN)
setWindowFullscreen(pWindow, true, FULLSCREEN_FULL);
setWindowFullscreen(pWindow, true, FULLSCREENMODE);
}