summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorMihail Costea <mihail.costea@dealfront.com>2026-04-20 18:56:30 +0300
committerGitHub <noreply@github.com>2026-04-20 16:56:30 +0100
commite12d2b7cc846485a172444c2e5288c55fa3a3c59 (patch)
tree34ee6c646d31160c686a029ae1ca634bb1e6bfad /src/config
parenta360c31d0434898888e710f4a5f560200f50cecf (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/config')
-rw-r--r--src/config/legacy/ConfigManager.cpp1
-rw-r--r--src/config/supplementary/ConfigDescriptions.hpp8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/config/legacy/ConfigManager.cpp b/src/config/legacy/ConfigManager.cpp
index bfe8fef3..310d2710 100644
--- a/src/config/legacy/ConfigManager.cpp
+++ b/src/config/legacy/ConfigManager.cpp
@@ -684,6 +684,7 @@ CConfigManager::CConfigManager() {
registerConfigVar("animations:workspace_wraparound", Hyprlang::INT{0});
registerConfigVar("input:follow_mouse", Hyprlang::INT{1});
+ registerConfigVar("input:follow_mouse_shrink", Hyprlang::INT{0});
registerConfigVar("input:follow_mouse_threshold", Hyprlang::FLOAT{0});
registerConfigVar("input:focus_on_close", Hyprlang::INT{0});
registerConfigVar("input:mouse_refocus", Hyprlang::INT{1});
diff --git a/src/config/supplementary/ConfigDescriptions.hpp b/src/config/supplementary/ConfigDescriptions.hpp
index de679b52..862cc1a9 100644
--- a/src/config/supplementary/ConfigDescriptions.hpp
+++ b/src/config/supplementary/ConfigDescriptions.hpp
@@ -640,6 +640,14 @@ namespace Config::Supplementary {
.data = SConfigOptionDescription::SRangeData{1, 0, 3},
},
SConfigOptionDescription{
+ .value = "input:follow_mouse_shrink",
+ .description =
+ "Shrinks the inactive window hitboxes used for focus detection by the specified number of pixels. This creates a dead zone in gaps between windows where "
+ "moving the cursor will not change focus. Works only with follow_mouse = 1.",
+ .type = CONFIG_OPTION_INT,
+ .data = SConfigOptionDescription::SRangeData{0, 0, 300},
+ },
+ SConfigOptionDescription{
.value = "input:follow_mouse_threshold",
.description = "The smallest distance in logical pixels the mouse needs to travel for the window under it to get focused. Works only with follow_mouse = 1.",
.type = CONFIG_OPTION_FLOAT,