renderer: fixup some missing fadeout cases with special

fixes some fadeout missing cases:

- closing last window
- closing above fs
- closing in general

fixes #10283
This commit is contained in:
Vaxry
2025-06-11 17:52:16 +02:00
parent 8329de1ab5
commit 412c7dc7f7
4 changed files with 47 additions and 29 deletions

View File

@@ -510,6 +510,12 @@ void CWindow::onUnmap() {
m_lastWorkspace = m_workspace->m_id;
// if the special workspace now has 0 windows, it will be closed, and this
// window will no longer pass render checks, cuz the workspace will be nuked.
// throw it into the main one for the fadeout.
if (m_workspace->m_isSpecialWorkspace && m_workspace->getWindows() == 0)
m_lastWorkspace = m_monitor->activeWorkspaceID();
std::erase_if(g_pCompositor->m_windowFocusHistory, [this](const auto& other) { return other.expired() || other == m_self; });
if (*PCLOSEONLASTSPECIAL && m_workspace && m_workspace->getWindows() == 0 && onSpecialWorkspace()) {