From 4b3efc73c5d059e828f79952d80ff79c97521c3d Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 6 Oct 2023 01:11:47 +0100 Subject: events: fixup empty events not being sent on unmap Ref #3506 https://github.com/hyprwm/Hyprland/issues/3506#issuecomment-1749508111 --- src/Compositor.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 7fa45b07..66306888 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -893,6 +893,10 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { g_pLayoutManager->getCurrentLayout()->bringWindowToTop(pWindow); if (!pWindow || !windowValidMapped(pWindow)) { + + if (!m_pLastWindow && !pWindow) + return; + const auto PLASTWINDOW = m_pLastWindow; m_pLastWindow = nullptr; -- cgit v1.2.3