fix closing fullscreen window

This commit is contained in:
vaxerski 2021-11-28 12:57:10 +01:00
parent 3f58a2539d
commit 5f8634adbb

View file

@ -744,8 +744,12 @@ void CWindowManager::eatWindow(CWindow* a, CWindow* toEat) {
void CWindowManager::closeWindowAllChecks(int64_t id) { void CWindowManager::closeWindowAllChecks(int64_t id) {
// fix last window if tile // fix last window if tile
const auto CLOSEDWINDOW = g_pWindowManager->getWindowFromDrawable(id); const auto CLOSEDWINDOW = g_pWindowManager->getWindowFromDrawable(id);
if (CLOSEDWINDOW && !CLOSEDWINDOW->getIsFloating()) { if (CLOSEDWINDOW) {
if (!CLOSEDWINDOW->getIsFloating())
g_pWindowManager->fixWindowOnClose(CLOSEDWINDOW); g_pWindowManager->fixWindowOnClose(CLOSEDWINDOW);
if (const auto WORKSPACE = getWorkspaceByID(CLOSEDWINDOW->getWorkspaceID()); WORKSPACE && CLOSEDWINDOW->getFullscreen())
WORKSPACE->setHasFullscreenWindow(false);
} }
// delete off of the arr // delete off of the arr