summaryrefslogtreecommitdiff
path: root/src/desktop/state/FocusState.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/desktop/state/FocusState.cpp
parent2824ffdda04d8471cd8a4ff30641ea06e4d80cf5 (diff)
windows/focus: add fallbacks when focussing workspaces (#14270)
Diffstat (limited to 'src/desktop/state/FocusState.cpp')
-rw-r--r--src/desktop/state/FocusState.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/desktop/state/FocusState.cpp b/src/desktop/state/FocusState.cpp
index 5db4bac5..5dd22f94 100644
--- a/src/desktop/state/FocusState.cpp
+++ b/src/desktop/state/FocusState.cpp
@@ -167,8 +167,12 @@ void CFocusState::rawWindowFocus(PHLWINDOW pWindow, eFocusReason reason, SP<CWLS
return;
}
- const auto PLASTWINDOW = m_focusWindow.lock();
- m_focusWindow = pWindow;
+ if (PMONITOR && !pWindow->m_pinned)
+ rawMonitorFocus(PMONITOR);
+
+ const auto PLASTWINDOW = m_focusWindow.lock();
+ m_focusWindow = pWindow;
+ pWindow->m_workspace->m_lastFocusedWindow = pWindow;
/* If special fallthrough is enabled, this behavior will be disabled, as I have no better idea of nicely tracking which
window focuses are "via keybinds" and which ones aren't. */