[PATCH libinput 1/9] touchpad: simplify resolution check

Hans de Goede hdegoede at redhat.com
Tue Mar 17 04:20:49 PDT 2015


Hi,

On 17-03-15 06:34, Peter Hutterer wrote:
> The struct evdev_device's absinfo_x/y point to the right axis
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

The entire series looks good to me and is:

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

Regards,

Hans

> ---
>   src/evdev-mt-touchpad.c | 13 ++-----------
>   1 file changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
> index a932287..d0311a4 100644
> --- a/src/evdev-mt-touchpad.c
> +++ b/src/evdev-mt-touchpad.c
> @@ -961,17 +961,8 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal)
>   {
>   	int res_x, res_y;
>
> -	if (tp->has_mt) {
> -		res_x = libevdev_get_abs_resolution(tp->device->evdev,
> -						    ABS_MT_POSITION_X);
> -		res_y = libevdev_get_abs_resolution(tp->device->evdev,
> -						    ABS_MT_POSITION_Y);
> -	} else {
> -		res_x = libevdev_get_abs_resolution(tp->device->evdev,
> -						    ABS_X);
> -		res_y = libevdev_get_abs_resolution(tp->device->evdev,
> -						    ABS_Y);
> -	}
> +	res_x = tp->device->abs.absinfo_x->resolution;
> +	res_y = tp->device->abs.absinfo_y->resolution;
>
>   	/*
>   	 * Not all touchpads report the same amount of units/mm (resolution).
>


More information about the wayland-devel mailing list