diff options
| author | unrealhoang <unrealhoang@gmail.com> | 2023-09-06 21:54:48 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-06 14:54:48 +0200 |
| commit | f90a009e9387c3132721e9f6c9b4308876519094 (patch) | |
| tree | 253d0729778424f0c67c2339633a378db59bfed6 /src/managers/input/InputManager.cpp | |
| parent | 8b9cc9a8dbebc0dc988a97d95c49cce2993529e1 (diff) | |
input/config: add button scroll lock (#3189)
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index c0e16487..c6daeb2a 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -1030,6 +1030,10 @@ void CInputManager::setPointerConfigs() { libinput_device_config_scroll_set_button(LIBINPUTDEV, SCROLLBUTTON == 0 ? libinput_device_config_scroll_get_default_button(LIBINPUTDEV) : SCROLLBUTTON); + const auto SCROLLBUTTONLOCK = HASCONFIG ? g_pConfigManager->getDeviceInt(devname, "scroll_button_lock", 0) : g_pConfigManager->getInt("input:scroll_button_lock"); + + libinput_device_config_scroll_set_button_lock(LIBINPUTDEV, SCROLLBUTTONLOCK == 0 ? LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_DISABLED : LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_ENABLED); + Debug::log(LOG, "Applied config to mouse {}, sens {:.2f}", m.name.c_str(), LIBINPUTSENS); } } |
