46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
From 5d961f282df3296f9b8f1126a196bc163f6ba011 Mon Sep 17 00:00:00 2001
|
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Date: Wed, 28 Oct 2015 09:20:33 +1000
|
|
Subject: [PATCH libinput 2/5] evdev: log a bug for missing pointer accel on
|
|
relative events
|
|
|
|
And use the unaccelerated motion events. Better than crashing, and better than
|
|
a non-moving mouse.
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@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
|
|
|