fix fullscreen state when moving a fullscreen window

This commit is contained in:
vaxerski 2022-02-17 23:12:08 +01:00
parent abf3464cfc
commit 4cfd62b72e

View file

@ -1454,6 +1454,14 @@ void CWindowManager::moveActiveWindowToWorkspace(int workspace) {
const auto SAVEDFLOATSTATUS = PWINDOW->getIsFloating(); const auto SAVEDFLOATSTATUS = PWINDOW->getIsFloating();
const auto SAVEDDRAWABLE = PWINDOW->getDrawable(); const auto SAVEDDRAWABLE = PWINDOW->getDrawable();
// remove current workspace's fullscreen status if fullscreen
if (PWINDOW->getFullscreen()) {
const auto PWORKSPACE = getWorkspaceByID(PWINDOW->getWorkspaceID());
if (PWORKSPACE) {
PWORKSPACE->setHasFullscreenWindow(false);
}
}
fixWindowOnClose(PWINDOW); fixWindowOnClose(PWINDOW);
// deque reallocated // deque reallocated
LastWindow = SAVEDDRAWABLE; LastWindow = SAVEDDRAWABLE;
@ -1491,6 +1499,13 @@ void CWindowManager::moveActiveWindowToWorkspace(int workspace) {
else else
Events::remapWindow(PWINDOW->getDrawable(), false, NEWMONITOR); Events::remapWindow(PWINDOW->getDrawable(), false, NEWMONITOR);
// fix fullscreen status
const auto PWORKSPACE = getWorkspaceByID(workspace);
if (PWORKSPACE) {
// Should NEVER be false but let's be sure
PWORKSPACE->setHasFullscreenWindow(PWINDOW->getFullscreen());
}
PWINDOW->setDefaultSize(SAVEDDEFAULTSIZE); PWINDOW->setDefaultSize(SAVEDDEFAULTSIZE);
} }