From 22384869a63e5c9c46f2cfbd0c914ceb01ca9a2e Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 5 Nov 2022 13:37:57 +0000 Subject: [PATCH] fix unregistering avars on sethidden --- src/Window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } }