From 3ca2d3b678b164e4ac0c14be59445c4fe30c9187 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 30 Mar 2022 21:18:42 +0200 Subject: fix some crashes --- src/Window.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index e69de29b..0e5573bb 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -0,0 +1,7 @@ +#include "Window.hpp" +#include "Compositor.hpp" + +CWindow::~CWindow() { + if ((this->m_uSurface.xdg || this->m_uSurface.xwayland) && g_pCompositor->m_pLastFocus == g_pXWaylandManager->getWindowSurface(this)) + g_pCompositor->m_pLastFocus = nullptr; +} \ No newline at end of file -- cgit v1.2.3