aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-06 19:34:48 +0200
committervaxerski <[email protected]>2022-05-06 19:34:48 +0200
commitaa5b0d2cda4aa3a06bb80b69dbcbb18ffddb8c8f (patch)
treed2f5f8eba0ab3e3ddb1f08c1398768bf609a8b34 /src
parent034192650f8194a8720e88070a7287b3f0523ba4 (diff)
downloadHyprland-aa5b0d2cda4aa3a06bb80b69dbcbb18ffddb8c8f.tar.gz
Hyprland-aa5b0d2cda4aa3a06bb80b69dbcbb18ffddb8c8f.zip
add natural scroll opt
Diffstat (limited to 'src')
-rw-r--r--src/config/ConfigManager.cpp1
-rw-r--r--src/managers/InputManager.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index ad8da9ae..2f114670 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -64,6 +64,7 @@ void CConfigManager::setDefaultVars() {
configValues["input:kb_model"].strValue = STRVAL_EMPTY;
configValues["input:repeat_rate"].intValue = 25;
configValues["input:repeat_delay"].intValue = 600;
+ configValues["input:natural_scroll"].intValue = 0;
configValues["input:touchpad:disable_while_typing"].intValue = 1;
configValues["input:follow_mouse"].intValue = 1;
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp
index 6647aaeb..b3b6db37 100644
--- a/src/managers/InputManager.cpp
+++ b/src/managers/InputManager.cpp
@@ -275,7 +275,7 @@ void CInputManager::newMouse(wlr_input_device* mouse) {
libinput_device_config_tap_set_enabled(LIBINPUTDEV, LIBINPUT_CONFIG_TAP_ENABLED);
if (libinput_device_config_scroll_has_natural_scroll(LIBINPUTDEV))
- libinput_device_config_scroll_set_natural_scroll_enabled(LIBINPUTDEV, 0 /* Natural */);
+ libinput_device_config_scroll_set_natural_scroll_enabled(LIBINPUTDEV, g_pConfigManager->getInt("input:natural_scroll"));
if (libinput_device_config_dwt_is_available(LIBINPUTDEV)) {
const auto DWT = static_cast<enum libinput_config_dwt_state>(g_pConfigManager->getInt("input:touchpad:disable_while_typing") != 0);