summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-12-12 00:59:47 +0100
committerGitHub <noreply@github.com>2025-12-11 23:59:47 +0000
commit8dfdcfb35385eabb821e668d327b30ea3e483ab8 (patch)
treef809eeb43e6c5ff0e88dd39cd48e2635d7278368 /src/managers/KeybindManager.cpp
parent5700736505557363f8574f5abcc6c0f489821466 (diff)
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()
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index bda1ff5a..b33ca3c1 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -1487,7 +1487,7 @@ SDispatchResult CKeybindManager::moveFocusTo(std::string args) {
}
const auto PLASTWINDOW = Desktop::focusState()->window();
- if (!PLASTWINDOW) {
+ if (!PLASTWINDOW || !PLASTWINDOW->aliveAndVisible()) {
if (*PMONITORFALLBACK)
tryMoveFocusToMonitor(g_pCompositor->getMonitorInDirection(arg));