summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorJManch <61563764+JManch@users.noreply.github.com>2024-11-11 13:45:33 +0000
committerGitHub <noreply@github.com>2024-11-11 13:45:33 +0000
commit07052a515bea46e8b01d3ca5b2c284c272c5ed34 (patch)
treeec2bb8d9bd352c4b8f2d7024aa16b1013a0fec4c /src/config
parent1fa0cd7a7574c8e93c567bf0453c155285dd3960 (diff)
pointer: map devices across all outputs by default (#8352)
Diffstat (limited to 'src/config')
-rw-r--r--src/config/ConfigDescriptions.hpp10
-rw-r--r--src/config/ConfigManager.cpp2
2 files changed, 10 insertions, 2 deletions
diff --git a/src/config/ConfigDescriptions.hpp b/src/config/ConfigDescriptions.hpp
index 12e81f2a..fde8173d 100644
--- a/src/config/ConfigDescriptions.hpp
+++ b/src/config/ConfigDescriptions.hpp
@@ -620,17 +620,23 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = {
},
SConfigOptionDescription{
.value = "input:tablet:output",
- .description = "the monitor to bind tablets. Empty means unbound..",
+ .description = "the monitor to bind tablets. Can be current or a monitor name. Leave empty to map across all monitors.",
.type = CONFIG_OPTION_STRING_SHORT,
.data = SConfigOptionDescription::SStringData{""}, //##TODO UNSET?
},
SConfigOptionDescription{
.value = "input:tablet:region_position",
- .description = "position of the mapped region in monitor layout.",
+ .description = "position of the mapped region in monitor layout relative to the top left corner of the bound monitor or all monitors.",
.type = CONFIG_OPTION_VECTOR,
.data = SConfigOptionDescription::SVectorData{{}, {-20000, -20000}, {20000, 20000}},
},
SConfigOptionDescription{
+ .value = "input:tablet:absolute_region_position",
+ .description = "whether to treat the region_position as an absolute position in monitor layout. Only applies when output is empty.",
+ .type = CONFIG_OPTION_BOOL,
+ .data = SConfigOptionDescription::SBoolData{false},
+ },
+ SConfigOptionDescription{
.value = "input:tablet:region_size",
.description = "size of the mapped region. When this variable is set, tablet input will be mapped to the region. [0, 0] or invalid size means unset.",
.type = CONFIG_OPTION_VECTOR,
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 769a7525..fbbc8dbd 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -516,6 +516,7 @@ CConfigManager::CConfigManager() {
m_pConfig->addConfigValue("input:tablet:transform", Hyprlang::INT{0});
m_pConfig->addConfigValue("input:tablet:output", {STRVAL_EMPTY});
m_pConfig->addConfigValue("input:tablet:region_position", Hyprlang::VEC2{0, 0});
+ m_pConfig->addConfigValue("input:tablet:absolute_region_position", Hyprlang::INT{0});
m_pConfig->addConfigValue("input:tablet:region_size", Hyprlang::VEC2{0, 0});
m_pConfig->addConfigValue("input:tablet:relative_input", Hyprlang::INT{0});
m_pConfig->addConfigValue("input:tablet:left_handed", Hyprlang::INT{0});
@@ -625,6 +626,7 @@ CConfigManager::CConfigManager() {
m_pConfig->addSpecialConfigValue("device", "output", {STRVAL_EMPTY});
m_pConfig->addSpecialConfigValue("device", "enabled", Hyprlang::INT{1}); // only for mice, touchpads, and touchdevices
m_pConfig->addSpecialConfigValue("device", "region_position", Hyprlang::VEC2{0, 0}); // only for tablets
+ m_pConfig->addSpecialConfigValue("device", "absolute_region_position", Hyprlang::INT{0}); // only for tablets
m_pConfig->addSpecialConfigValue("device", "region_size", Hyprlang::VEC2{0, 0}); // only for tablets
m_pConfig->addSpecialConfigValue("device", "relative_input", Hyprlang::INT{0}); // only for tablets
m_pConfig->addSpecialConfigValue("device", "active_area_position", Hyprlang::VEC2{0, 0}); // only for tablets