diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-06-11 17:52:16 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-06-11 17:52:23 +0200 |
| commit | 412c7dc7f79cb6b04af41692504e82d4417e6e13 (patch) | |
| tree | 6515bfadb5fbaae3365a9fc2ffedcab05f8277c3 /src/desktop/Window.cpp | |
| parent | 8329de1ab530782aa3e45228632fce3b46fbf183 (diff) | |
renderer: fixup some missing fadeout cases with special
fixes some fadeout missing cases:
- closing last window
- closing above fs
- closing in general
fixes #10283
Diffstat (limited to 'src/desktop/Window.cpp')
| -rw-r--r-- | src/desktop/Window.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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()) { |
