summaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index 0e5573bb..ff8ba299 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -2,6 +2,8 @@
#include "Compositor.hpp"
CWindow::~CWindow() {
- if ((this->m_uSurface.xdg || this->m_uSurface.xwayland) && g_pCompositor->m_pLastFocus == g_pXWaylandManager->getWindowSurface(this))
+ if (g_pCompositor->isWindowActive(this)) {
g_pCompositor->m_pLastFocus = nullptr;
+ g_pCompositor->m_pLastWindow = nullptr;
+ }
} \ No newline at end of file