From 9ddf1b105e1b63a77b851af5e541a9412b0e0928 Mon Sep 17 00:00:00 2001 From: Khalid Date: Wed, 20 Mar 2024 07:00:43 +0300 Subject: tablet: Add left_handed option for tablets (#5178) * Add left_handed option for tablets * Update left_handed tablet option's fallback string --- src/managers/input/InputManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/managers/input/InputManager.cpp') diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 04981e4e..7d820c8f 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -1418,6 +1418,11 @@ void CInputManager::setTabletConfigs() { Debug::log(LOG, "Setting calibration matrix for device {}", t.name); libinput_device_config_calibration_set_matrix(LIBINPUTDEV, MATRICES[ROTATION]); + if (g_pConfigManager->getDeviceInt(t.name, "left_handed", "input:tablet:left_handed") == 0) + libinput_device_config_left_handed_set(LIBINPUTDEV, 0); + else + libinput_device_config_left_handed_set(LIBINPUTDEV, 1); + const auto OUTPUT = g_pConfigManager->getDeviceString(t.name, "output", "input:tablet:output"); const auto PMONITOR = g_pCompositor->getMonitorFromString(OUTPUT); if (!OUTPUT.empty() && OUTPUT != STRVAL_EMPTY && PMONITOR) { -- cgit v1.2.3