summaryrefslogtreecommitdiff
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
parent88dbd866e0d7d16e687b1984d092716825e8a148 (diff)
downloadefl-7fcb3f5db143944d83e7286c8a84a04e1fbbf119.tar.gz
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.
-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
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)