diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-02-15 01:51:01 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-02-15 01:51:01 +0000 |
| commit | e5ac970d6eafa725167b3123e7f6c28aca20ff21 (patch) | |
| tree | 20737abeb3825856afb2cef83783779985a5070f /src/managers/input/InputManager.cpp | |
| parent | 770956b0921139ea13b478dda0e301842546d74c (diff) | |
input: fix follow_focus
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index d6ddba46..d45b1dc9 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -423,12 +423,12 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { return; // don't enter any new surfaces } else { if (allowKeyboardRefocus && ((FOLLOWMOUSE != 3 && (*PMOUSEREFOCUS || m_pLastMouseFocus != pFoundWindow)) || refocus)) { - if (m_pLastMouseFocus != pFoundWindow || g_pCompositor->m_pLastFocus != foundSurface) { + if (m_pLastMouseFocus != pFoundWindow || g_pCompositor->m_pLastWindow != pFoundWindow || g_pCompositor->m_pLastFocus != foundSurface) { m_pLastMouseFocus = pFoundWindow; // TODO: this looks wrong. When over a popup, it constantly is switching. // Temp fix until that's figured out. Otherwise spams windowrule lookups and other shit. - if (m_pLastMouseFocus != pFoundWindow) + if (m_pLastMouseFocus != pFoundWindow || g_pCompositor->m_pLastWindow != pFoundWindow) g_pCompositor->focusWindow(pFoundWindow, foundSurface); else g_pCompositor->focusSurface(foundSurface, pFoundWindow); |
