elput: Verify pointer device is accel capable before setting speed

As we cannot set mouse accel speed unless an input device is capable,
we add a small test here to check that it supports acceleration.
This commit is contained in:
Christopher Michael 2019-01-02 14:54:00 -05:00
parent 88dbd866e0
commit 7fcb3f5db1
1 changed files with 3 additions and 0 deletions

View File

@ -832,6 +832,9 @@ elput_input_pointer_accel_speed_set(Elput_Manager *manager, const char *seat, do
LIBINPUT_DEVICE_CAP_POINTER))
continue;
if (!libinput_device_config_accel_is_available(edev->device))
continue;
if (libinput_device_config_accel_set_speed(edev->device,
speed) !=
LIBINPUT_CONFIG_STATUS_SUCCESS)