diff --git a/src/Window.cpp b/src/Window.cpp index 21dac460..1cda063e 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -275,8 +275,8 @@ void CWindow::onMap() { void CWindow::setHidden(bool hidden) { m_bHidden = hidden; - if (hidden) { - onUnmap(); + if (hidden && g_pCompositor->m_pLastWindow == this) { + g_pCompositor->m_pLastWindow = nullptr; } }