From 8c094b0eec7724c75dd4a1cd7d29b1ff3fe32d18 Mon Sep 17 00:00:00 2001 From: TheOnlyMrCat Date: Thu, 22 Dec 2022 23:05:26 +1100 Subject: Make libinput tap-and-drag configurable (#1267) --- 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 43fc66cf..beb4f30a 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -743,6 +743,11 @@ void CInputManager::setPointerConfigs() { Debug::log(WARN, "Scroll method unknown"); } + if ((HASCONFIG ? g_pConfigManager->getDeviceInt(devname, "tap-and-drag") : g_pConfigManager->getInt("input:touchpad:tap-and-drag")) == 0) + libinput_device_config_tap_set_drag_enabled(LIBINPUTDEV, LIBINPUT_CONFIG_DRAG_DISABLED); + else + libinput_device_config_tap_set_drag_enabled(LIBINPUTDEV, LIBINPUT_CONFIG_DRAG_ENABLED); + if ((HASCONFIG ? g_pConfigManager->getDeviceInt(devname, "drag_lock") : g_pConfigManager->getInt("input:touchpad:drag_lock")) == 0) libinput_device_config_tap_set_drag_lock_enabled(LIBINPUTDEV, LIBINPUT_CONFIG_DRAG_LOCK_DISABLED); else -- cgit v1.2.3