diff options
| author | nyx <nnyyxxxx@protonmail.com> | 2025-04-21 14:48:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-21 20:48:27 +0200 |
| commit | 55e953b383f6b658b20ede1fea7772d2a88e7c65 (patch) | |
| tree | 2bf654ddde9f869ee209f168607b6724dd7171ac /src/managers/input/InputManager.cpp | |
| parent | d29723cb76479a860bf9d07d47c5a14b4d64dbc0 (diff) | |
InputManager: add nofollowmouse (#9994)
* InputManager: add nofollowmouse
with this, focus_follows_mouse=1 acts like focus_follows_mouse=2 on the specific windows defined by the user
* e
* e
biggest e of all time
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 7ca8dc00..6c3b3699 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -546,8 +546,12 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { // 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.lock() != pFoundWindow || g_pCompositor->m_pLastWindow.lock() != pFoundWindow) { - if (m_fMousePosDelta > *PFOLLOWMOUSETHRESHOLD || refocus) - g_pCompositor->focusWindow(pFoundWindow, foundSurface); + if (m_fMousePosDelta > *PFOLLOWMOUSETHRESHOLD || refocus) { + const bool hasNoFollowMouse = pFoundWindow && pFoundWindow->m_sWindowData.noFollowMouse.valueOrDefault(); + + if (refocus || !hasNoFollowMouse) + g_pCompositor->focusWindow(pFoundWindow, foundSurface); + } } else g_pCompositor->focusSurface(foundSurface, pFoundWindow); } |
