[PATCH libinput] touchpad: add elantech-specific pressure values

Hans de Goede hdegoede at redhat.com
Tue Mar 7 13:35:40 UTC 2017


Hi,

On 07-03-17 04:22, Peter Hutterer wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=99975
>
> 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 | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
> index c8e434e..e2866df 100644
> --- a/src/evdev-mt-touchpad.c
> +++ b/src/evdev-mt-touchpad.c
> @@ -2382,9 +2382,14 @@ tp_init_pressure(struct tp_dispatch *tp,
>
>  	range = abs->maximum - abs->minimum;
>
> -	/* Approximately the synaptics defaults */
> -	tp->pressure.high = abs->minimum + 0.12 * range;
> -	tp->pressure.low = abs->minimum + 0.10 * range;
> +	if (device->model_flags & EVDEV_MODEL_ELANTECH_TOUCHPAD) {
> +		tp->pressure.high = 24;
> +		tp->pressure.low = 10;
> +	} else {
> +		/* Approximately the synaptics defaults */
> +		tp->pressure.high = abs->minimum + 0.12 * range;
> +		tp->pressure.low = abs->minimum + 0.10 * range;
> +	}
>
>  	evdev_log_debug(device,
>  			"using pressure-based touch detection\n",
>


More information about the wayland-devel mailing list