diff options
| author | Mihail Costea <mihail.costea@dealfront.com> | 2026-04-20 18:56:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-20 16:56:30 +0100 |
| commit | e12d2b7cc846485a172444c2e5288c55fa3a3c59 (patch) | |
| tree | 34ee6c646d31160c686a029ae1ca634bb1e6bfad /src/managers | |
| parent | a360c31d0434898888e710f4a5f560200f50cecf (diff) | |
input: implement follow_mouse_shrink (#13707)
* input: implement follow_mouse_shrink
Add a new config option `input:follow_mouse_shrink` (INT, 0-300, default 0)
that shrinks inactive window hitboxes by the specified number of pixels for
focus detection purposes. This creates a dead zone in gaps between windows
where moving the cursor will not trigger a focus change.
The shrink only applies to inactive (non-focused) windows and only during
mouse-move focus checks (follow_mouse = 1). Click and scroll interactions
are unaffected — clicking on a window in the shrunk area still works
normally once the window is focused.
Closes #9973
* tests: add integration test for follow_mouse_shrink
Diffstat (limited to 'src/managers')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 95e7704a..c4df7c53 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -419,7 +419,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse, st PHLWINDOW pWindowIdeal; const auto getWindowIdeal = [&]() -> const PHLWINDOW& { if (!windowIdealQueried) { - pWindowIdeal = g_pCompositor->vectorToWindowUnified(mouseCoords, Desktop::View::RESERVED_EXTENTS | Desktop::View::INPUT_EXTENTS | Desktop::View::ALLOW_FLOATING); + pWindowIdeal = g_pCompositor->vectorToWindowUnified( + mouseCoords, Desktop::View::RESERVED_EXTENTS | Desktop::View::INPUT_EXTENTS | Desktop::View::ALLOW_FLOATING | Desktop::View::FOLLOW_MOUSE_CHECK); windowIdealQueried = true; } |
