summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authormay <63159454+m4rch3n1ng@users.noreply.github.com>2025-06-15 11:45:06 +0200
committerGitHub <noreply@github.com>2025-06-15 11:45:06 +0200
commitf08167c877227b2c9e0b59e7d38d072bdcd944a5 (patch)
tree1c655f727b71f287efa272999fdee598162650a6 /src/config
parentad85406220d88c3de9ceba32f17a25caf101bb45 (diff)
input: add sticky option for drag_lock (#10702)
* allow configuring the sticky option for `drag_lock` * enable sticky drag_lock by default as recommended by libinput recommended here: https://lists.freedesktop.org/archives/wayland-devel/2024-November/043860.html
Diffstat (limited to 'src/config')
-rw-r--r--src/config/ConfigDescriptions.hpp7
-rw-r--r--src/config/ConfigManager.cpp4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/config/ConfigDescriptions.hpp b/src/config/ConfigDescriptions.hpp
index 7d62c833..a4bcf440 100644
--- a/src/config/ConfigDescriptions.hpp
+++ b/src/config/ConfigDescriptions.hpp
@@ -623,9 +623,10 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = {
},
SConfigOptionDescription{
.value = "input:touchpad:drag_lock",
- .description = "When enabled, lifting the finger off for a short time while dragging will not drop the dragged item.",
- .type = CONFIG_OPTION_BOOL,
- .data = SConfigOptionDescription::SBoolData{false},
+ .description = "When enabled, lifting the finger off while dragging will not drop the dragged item. 0 -> disabled, 1 -> enabled with timeout, 2 -> enabled sticky."
+ "dragging will not drop the dragged item.",
+ .type = CONFIG_OPTION_INT,
+ .data = SConfigOptionDescription::SRangeData{2, 0, 2},
},
SConfigOptionDescription{
.value = "input:touchpad:tap-and-drag",
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 6759771c..8fc6e326 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -652,7 +652,7 @@ CConfigManager::CConfigManager() {
registerConfigVar("input:touchpad:middle_button_emulation", Hyprlang::INT{0});
registerConfigVar("input:touchpad:tap-to-click", Hyprlang::INT{1});
registerConfigVar("input:touchpad:tap-and-drag", Hyprlang::INT{1});
- registerConfigVar("input:touchpad:drag_lock", Hyprlang::INT{0});
+ registerConfigVar("input:touchpad:drag_lock", Hyprlang::INT{2});
registerConfigVar("input:touchpad:scroll_factor", {1.f});
registerConfigVar("input:touchpad:flip_x", Hyprlang::INT{0});
registerConfigVar("input:touchpad:flip_y", Hyprlang::INT{0});
@@ -775,7 +775,7 @@ CConfigManager::CConfigManager() {
m_config->addSpecialConfigValue("device", "middle_button_emulation", Hyprlang::INT{0});
m_config->addSpecialConfigValue("device", "tap-to-click", Hyprlang::INT{1});
m_config->addSpecialConfigValue("device", "tap-and-drag", Hyprlang::INT{1});
- m_config->addSpecialConfigValue("device", "drag_lock", Hyprlang::INT{0});
+ m_config->addSpecialConfigValue("device", "drag_lock", Hyprlang::INT{2});
m_config->addSpecialConfigValue("device", "left_handed", Hyprlang::INT{0});
m_config->addSpecialConfigValue("device", "scroll_method", {STRVAL_EMPTY});
m_config->addSpecialConfigValue("device", "scroll_button", Hyprlang::INT{0});