diff options
| author | Histausse <histausse@protonmail.com> | 2022-10-07 16:03:52 +0200 |
|---|---|---|
| committer | Histausse <histausse@protonmail.com> | 2022-10-08 15:25:46 +0200 |
| commit | 32ae0c51f006cbcf41cfae3cff4d3f63ba91cccd (patch) | |
| tree | 0d90ee91ea746368cc5d612d7c4d8752a70ec928 /src/config | |
| parent | fe4a97f2450f9ebb916bf62502fd46470f7735dd (diff) | |
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.
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/ConfigManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |
