diff options
Diffstat (limited to 'src/desktop/state/FocusState.cpp')
| -rw-r--r-- | src/desktop/state/FocusState.cpp | 8 |
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. */ |
