From 412c7dc7f79cb6b04af41692504e82d4417e6e13 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 11 Jun 2025 17:52:16 +0200 Subject: renderer: fixup some missing fadeout cases with special fixes some fadeout missing cases: - closing last window - closing above fs - closing in general fixes #10283 --- src/desktop/Window.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/desktop/Window.cpp') diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 555b99f0..93395780 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -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()) { -- cgit v1.2.3