summaryrefslogtreecommitdiff
path: root/src/lib/elput
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-01-02 14:54:00 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-01-02 14:55:13 -0500
commit7fcb3f5db143944d83e7286c8a84a04e1fbbf119 (patch)
tree70ce248457f260da82f6168dc7a89b65732db042 /src/lib/elput
parent88dbd866e0d7d16e687b1984d092716825e8a148 (diff)
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.
Diffstat (limited to 'src/lib/elput')
-rw-r--r--src/lib/elput/elput_input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index 06da3d0149..ca0e130002 100644
--- a/src/lib/elput/elput_input.c
+++ b/src/lib/elput/elput_input.c
@@ -832,6 +832,9 @@ elput_input_pointer_accel_speed_set(Elput_Manager *manager, const char *seat, do
832 LIBINPUT_DEVICE_CAP_POINTER)) 832 LIBINPUT_DEVICE_CAP_POINTER))
833 continue; 833 continue;
834 834
835 if (!libinput_device_config_accel_is_available(edev->device))
836 continue;
837
835 if (libinput_device_config_accel_set_speed(edev->device, 838 if (libinput_device_config_accel_set_speed(edev->device,
836 speed) != 839 speed) !=
837 LIBINPUT_CONFIG_STATUS_SUCCESS) 840 LIBINPUT_CONFIG_STATUS_SUCCESS)