[PATCH libinput 1/3] evdev: log a bug for missing pointer accel on relative events

Hans de Goede hdegoede at redhat.com
Fri Oct 30 02:08:05 PDT 2015


Hi,

On 30-10-15 02:19, Peter Hutterer wrote:
> 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>

The entire set looks good to me and is:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans


> ---
>   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;
>


More information about the wayland-devel mailing list