From 32ae0c51f006cbcf41cfae3cff4d3f63ba91cccd Mon Sep 17 00:00:00 2001 From: Histausse Date: Fri, 7 Oct 2022 16:03:52 +0200 Subject: Add input:touchdevice:td_rotation config Add support for touch device roation. The rotation is set globally with `input:touchdevice:td_rotation config` and by device with `td_rotation` in a device block. --- src/config/ConfigManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/config') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 1d8dbd2d..7679c3a4 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -147,6 +147,7 @@ void CConfigManager::setDefaultVars() { configValues["input:touchpad:tap-to-click"].intValue = 1; configValues["input:touchpad:drag_lock"].intValue = 0; configValues["input:touchpad:scroll_factor"].floatValue = 1.f; + configValues["input:touchdevice:td_rotation"].intValue = 0; configValues["binds:pass_mouse_when_bound"].intValue = 0; configValues["binds:scroll_event_delay"].intValue = 300; @@ -187,6 +188,7 @@ void CConfigManager::setDeviceDefaultVars(const std::string& dev) { cfgValues["drag_lock"].intValue = 0; cfgValues["left_handed"].intValue = 0; cfgValues["scroll_method"].strValue = STRVAL_EMPTY; + cfgValues["td_rotation"].intValue = 0; } void CConfigManager::setDefaultAnimationVars() { @@ -1139,6 +1141,7 @@ void CConfigManager::loadConfigLoadVars() { if (!isFirstLaunch) { g_pInputManager->setKeyboardLayout(); g_pInputManager->setPointerConfigs(); + g_pInputManager->setTouchDeviceConfigs(); } // Calculate the internal vars @@ -1424,6 +1427,7 @@ void CConfigManager::dispatchExecOnce() { // set input, fixes some certain issues g_pInputManager->setKeyboardLayout(); g_pInputManager->setPointerConfigs(); + g_pInputManager->setTouchDeviceConfigs(); // set ws names again for (auto& ws : g_pCompositor->m_vWorkspaces) { -- cgit v1.2.3