From 223beb8a826773e2e3ea4c6d7e7d40fde9247d9a Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 2 Apr 2022 18:57:09 +0200 Subject: Multiple focus handling changes --- src/Window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Window.cpp') 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 -- cgit v1.2.3