From 8dfdcfb35385eabb821e668d327b30ea3e483ab8 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Fri, 12 Dec 2025 00:59:47 +0100 Subject: compositor: dont try to focus unmapped window (#12629) * compositor: dont try to focus unmapped window if lastwindow is unmapped it hits getWindowInDirection and nullptr derefs window->m_workspace. and coredumps. triggered by dual monitor and one client on each surface with a combination of animation and killactive / movefocus keybind. * keybindmgr: use newly added aliveAndVisible() use newly added aliveAndVisible() over visible() --- src/Compositor.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index a0a8c9ac..b9e2f315 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1380,6 +1380,9 @@ PHLWINDOW CCompositor::getWindowInDirection(PHLWINDOW pWindow, char dir) { const auto WINDOWIDEALBB = pWindow->isFullscreen() ? CBox{PMONITOR->m_position, PMONITOR->m_size} : pWindow->getWindowIdealBoundingBoxIgnoreReserved(); const auto PWORKSPACE = pWindow->m_workspace; + if (!PWORKSPACE) + return nullptr; // ?? + return getWindowInDirection(WINDOWIDEALBB, PWORKSPACE, dir, pWindow, pWindow->m_isFloating); } -- cgit v1.2.3