mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 06:31:57 -07:00
add scroll_button libinput opt
This commit is contained in:
@@ -142,6 +142,7 @@ void CConfigManager::setDefaultVars() {
|
|||||||
configValues["input:float_switch_override_focus"].intValue = 1;
|
configValues["input:float_switch_override_focus"].intValue = 1;
|
||||||
configValues["input:left_handed"].intValue = 0;
|
configValues["input:left_handed"].intValue = 0;
|
||||||
configValues["input:scroll_method"].strValue = STRVAL_EMPTY;
|
configValues["input:scroll_method"].strValue = STRVAL_EMPTY;
|
||||||
|
configValues["input:scroll_button"].intValue = 0;
|
||||||
configValues["input:touchpad:natural_scroll"].intValue = 0;
|
configValues["input:touchpad:natural_scroll"].intValue = 0;
|
||||||
configValues["input:touchpad:disable_while_typing"].intValue = 1;
|
configValues["input:touchpad:disable_while_typing"].intValue = 1;
|
||||||
configValues["input:touchpad:clickfinger_behavior"].intValue = 0;
|
configValues["input:touchpad:clickfinger_behavior"].intValue = 0;
|
||||||
@@ -193,6 +194,7 @@ void CConfigManager::setDeviceDefaultVars(const std::string& dev) {
|
|||||||
cfgValues["drag_lock"].intValue = 0;
|
cfgValues["drag_lock"].intValue = 0;
|
||||||
cfgValues["left_handed"].intValue = 0;
|
cfgValues["left_handed"].intValue = 0;
|
||||||
cfgValues["scroll_method"].strValue = STRVAL_EMPTY;
|
cfgValues["scroll_method"].strValue = STRVAL_EMPTY;
|
||||||
|
cfgValues["scroll_button"].intValue = 0;
|
||||||
cfgValues["touch_transform"].intValue = 0;
|
cfgValues["touch_transform"].intValue = 0;
|
||||||
cfgValues["touch_output"].strValue = STRVAL_EMPTY;
|
cfgValues["touch_output"].strValue = STRVAL_EMPTY;
|
||||||
cfgValues["enabled"].intValue = 1; // only for mice / touchpads
|
cfgValues["enabled"].intValue = 1; // only for mice / touchpads
|
||||||
|
@@ -779,7 +779,11 @@ void CInputManager::setPointerConfigs() {
|
|||||||
libinput_device_config_accel_set_profile(LIBINPUTDEV, LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT);
|
libinput_device_config_accel_set_profile(LIBINPUTDEV, LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT);
|
||||||
} else {
|
} else {
|
||||||
Debug::log(WARN, "Unknown acceleration profile, falling back to default");
|
Debug::log(WARN, "Unknown acceleration profile, falling back to default");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto SCROLLBUTTON = HASCONFIG ? g_pConfigManager->getDeviceInt(devname, "scroll_button") : g_pConfigManager->getInt("input:scroll_button");
|
||||||
|
|
||||||
|
libinput_device_config_scroll_set_button(LIBINPUTDEV, SCROLLBUTTON == 0 ? libinput_device_config_scroll_get_default_button(LIBINPUTDEV) : SCROLLBUTTON);
|
||||||
|
|
||||||
Debug::log(LOG, "Applied config to mouse %s, sens %.2f", m.name.c_str(), LIBINPUTSENS);
|
Debug::log(LOG, "Applied config to mouse %s, sens %.2f", m.name.c_str(), LIBINPUTSENS);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user