mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-05 04:06:28 -05:00
fix: accel_profile can't set to 0
This commit is contained in:
parent
e535aea28b
commit
4591b69e4d
1 changed files with 6 additions and 1 deletions
|
|
@ -2958,9 +2958,14 @@ void configure_pointer(struct libinput_device *device) {
|
|||
if (libinput_device_config_send_events_get_modes(device))
|
||||
libinput_device_config_send_events_set_mode(device, send_events_mode);
|
||||
|
||||
if (libinput_device_config_accel_is_available(device)) {
|
||||
if (accel_profile && libinput_device_config_accel_is_available(device)) {
|
||||
libinput_device_config_accel_set_profile(device, accel_profile);
|
||||
libinput_device_config_accel_set_speed(device, accel_speed);
|
||||
} else {
|
||||
// profile cannot be directly applied to 0, need to set to 1 first
|
||||
libinput_device_config_accel_set_profile(device, 1);
|
||||
libinput_device_config_accel_set_profile(device, 0);
|
||||
libinput_device_config_accel_set_speed(device, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue