From 41cdfb7420be3a8473c46f28d74cdada4c0f2258 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 21 Dec 2022 15:11:39 +0000 Subject: allow binding tablets to outputs --- src/config/ConfigManager.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 045a96a8..7d4ada08 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -200,8 +200,8 @@ void CConfigManager::setDeviceDefaultVars(const std::string& dev) { cfgValues["left_handed"].intValue = 0; cfgValues["scroll_method"].strValue = STRVAL_EMPTY; cfgValues["scroll_button"].intValue = 0; - cfgValues["touch_transform"].intValue = 0; - cfgValues["touch_output"].strValue = STRVAL_EMPTY; + cfgValues["transform"].intValue = 0; + cfgValues["output"].strValue = STRVAL_EMPTY; cfgValues["enabled"].intValue = 1; // only for mice / touchpads } @@ -298,6 +298,11 @@ void CConfigManager::configSetValueSafe(const std::string& COMMAND, const std::s auto it = deviceConfigs.find(DEVICE); if (it->second.find(CONFIGVAR) == it->second.end()) { + if (it->second.contains("touch_output") || it->second.contains("touch_transform")) { + parseError = "touch_output and touch_transform have been changed to output and transform respectively"; + return; + } + parseError = "Error setting value <" + VALUE + "> for field <" + COMMAND + ">: No such field."; return; } @@ -1229,6 +1234,7 @@ void CConfigManager::loadConfigLoadVars() { g_pInputManager->setKeyboardLayout(); g_pInputManager->setPointerConfigs(); g_pInputManager->setTouchDeviceConfigs(); + g_pInputManager->setTabletConfigs(); } // Calculate the internal vars @@ -1534,6 +1540,7 @@ void CConfigManager::dispatchExecOnce() { g_pInputManager->setKeyboardLayout(); g_pInputManager->setPointerConfigs(); g_pInputManager->setTouchDeviceConfigs(); + g_pInputManager->setTabletConfigs(); // set ws names again for (auto& ws : g_pCompositor->m_vWorkspaces) { -- cgit v1.2.3