[PATCH libinput 1/3] evdev: log a bug for missing pointer accel on relative events
Peter Hutterer
peter.hutterer at who-t.net
Thu Oct 29 18:19:11 PDT 2015
And use the unaccelerated motion events. Better than crashing, and better than
a non-moving mouse.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evdev.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index 45c1b1b..4c947d6 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -299,11 +299,18 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
if (evdev_post_trackpoint_scroll(device, unaccel, time))
break;
- /* Apply pointer acceleration. */
- accel = filter_dispatch(device->pointer.filter,
- &unaccel,
- device,
- time);
+ if (device->pointer.filter) {
+ /* Apply pointer acceleration. */
+ accel = filter_dispatch(device->pointer.filter,
+ &unaccel,
+ device,
+ time);
+ } else {
+ log_bug_libinput(libinput,
+ "%s: accel filter missing\n",
+ udev_device_get_devnode(device->udev_device));
+ accel = unaccel;
+ }
if (normalized_is_zero(accel) && normalized_is_zero(unaccel))
break;
--
2.4.3
More information about the wayland-devel
mailing list