summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-10-06 01:11:47 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-10-06 01:11:47 +0100
commit4b3efc73c5d059e828f79952d80ff79c97521c3d (patch)
treea9559258388a6926b1352d223f5af75faee69d68 /src/Compositor.cpp
parent24c04a8b7c874ead168bb2418f4325cb8bdaca5b (diff)
events: fixup empty events not being sent on unmap
Ref #3506 https://github.com/hyprwm/Hyprland/issues/3506#issuecomment-1749508111
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp4
1 files changed, 4 insertions, 0 deletions
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;