summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-12-09 04:07:28 +0000
committerVaxry <vaxry@vaxry.net>2023-12-09 04:07:28 +0000
commitdd0714c22a7f588c1c80f83b45f66f034f83a884 (patch)
treebe7a8afa419ed8adb284276574b0fb6467f6a988 /src/managers/input/InputManager.cpp
parent11d1c50420cdeaa5426b837a6479455f47368f29 (diff)
input: add relative_input for tablets
closes #2639
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 9ef1b4a3..21c9435d 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -1494,7 +1494,10 @@ void CInputManager::setTabletConfigs() {
if (wlr_input_device_is_libinput(t.wlrDevice)) {
const auto LIBINPUTDEV = (libinput_device*)wlr_libinput_get_device_handle(t.wlrDevice);
- const int ROTATION = std::clamp(g_pConfigManager->getDeviceInt(t.name, "transform", "input:tablet:transform"), 0, 7);
+ const auto RELINPUT = g_pConfigManager->getDeviceInt(t.name, "relative_input", "input:tablet:relative_input");
+ t.relativeInput = RELINPUT;
+
+ const int ROTATION = std::clamp(g_pConfigManager->getDeviceInt(t.name, "transform", "input:tablet:transform"), 0, 7);
Debug::log(LOG, "Setting calibration matrix for device {}", t.name);
libinput_device_config_calibration_set_matrix(LIBINPUTDEV, MATRICES[ROTATION]);