summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.cpp
diff options
context:
space:
mode:
authorfazzi <18248986+fxzzi@users.noreply.github.com>2026-05-04 17:00:56 +0100
committerGitHub <noreply@github.com>2026-05-04 17:00:56 +0100
commiteff3bfe261e90b8950b59379ca7815f735a7aab6 (patch)
tree5d4bef57fdd9130c47fbd6a24772bbbd321d61c0 /src/helpers/Monitor.cpp
parent2824ffdda04d8471cd8a4ff30641ea06e4d80cf5 (diff)
windows/focus: add fallbacks when focussing workspaces (#14270)
Diffstat (limited to 'src/helpers/Monitor.cpp')
-rw-r--r--src/helpers/Monitor.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index b2e94a31..c7d4168a 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -1406,10 +1406,7 @@ void CMonitor::changeWorkspace(const PHLWORKSPACE& pWorkspace, bool internal, bo
Desktop::View::RESERVED_EXTENTS | Desktop::View::INPUT_EXTENTS | Desktop::View::ALLOW_FLOATING);
if (!pWindow)
- pWindow = pWorkspace->getTopLeftWindow();
-
- if (!pWindow)
- pWindow = pWorkspace->getFirstWindow();
+ pWindow = pWorkspace->getFocusCandidate();
}
Desktop::focusState()->fullWindowFocus(pWindow, Desktop::FOCUS_REASON_KEYBIND);