[PATCH libinput] touchpad: add synaptics semi-mt devices to those needing hysteresis

Hans de Goede hdegoede at redhat.com
Wed Feb 17 15:15:24 UTC 2016


Hi,

On 17-02-16 01:11, Peter Hutterer wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=94097
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>


Patch looks good to me:

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

Regards,

Hans



> ---
>   src/evdev-mt-touchpad.c | 27 +++++++++++++++++++--------
>   1 file changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
> index d8b2334..912a0f0 100644
> --- a/src/evdev-mt-touchpad.c
> +++ b/src/evdev-mt-touchpad.c
> @@ -1991,17 +1991,28 @@ tp_init_hysteresis(struct tp_dispatch *tp)
>   {
>   	int res_x, res_y;
>
> +	if (tp->device->model_flags & EVDEV_MODEL_CYAPA)
> +		goto want_hysteresis;
> +
> +	if (tp->device->model_flags & EVDEV_MODEL_ALPS_RUSHMORE)
> +		goto want_hysteresis;
> +
> +	if (tp->semi_mt &&
> +	    (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD))
> +		goto want_hysteresis;
> +
> +	tp->hysteresis_margin.x = 0;
> +	tp->hysteresis_margin.y = 0;
> +
> +	return;
> +
> +want_hysteresis:
>   	res_x = tp->device->abs.absinfo_x->resolution;
>   	res_y = tp->device->abs.absinfo_y->resolution;
>
> -	if (tp->device->model_flags &
> -	    (EVDEV_MODEL_CYAPA|EVDEV_MODEL_ALPS_RUSHMORE)) {
> -		tp->hysteresis_margin.x = res_x/2;
> -		tp->hysteresis_margin.y = res_y/2;
> -	} else {
> -		tp->hysteresis_margin.x = 0;
> -		tp->hysteresis_margin.y = 0;
> -	}
> +	tp->hysteresis_margin.x = res_x/2;
> +	tp->hysteresis_margin.y = res_y/2;
> +	return;
>   }
>
>   static int
>


More information about the wayland-devel mailing list