[PATCH libinput] touchpad: cap the edge palm detection zones at 8mm
Daniel Martin
consume.noise at gmail.com
Mon Oct 23 07:34:29 UTC 2017
On 23 October 2017 at 07:42, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> The main purpose of the edge zone is to detect palms in the area where we
> cannot assume a full finger size and thus cannot use any other palm detection
> mechanism. 8mm should be large enough that a finger should be detected based
> on other properties (size, pressure, ...).
>
> https://bugs.freedesktop.org/show_bug.cgi?id=103330
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> src/evdev-mt-touchpad.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
> index 81a56a05..8bb0661b 100644
> --- a/src/evdev-mt-touchpad.c
> +++ b/src/evdev-mt-touchpad.c
> @@ -2646,8 +2646,8 @@ tp_init_palmdetect_edge(struct tp_dispatch *tp,
> if (width < 70.0)
> return;
>
> - /* palm edges are 8% of the width on each side */
> - mm.x = width * 0.08;
> + /* palm edges are 8% of the width on each side up to a max of 7mm */
s/7mm/8mm/
> + mm.x = min(8, width * 0.08);
> edges = evdev_device_mm_to_units(device, &mm);
> tp->palm.left_edge = edges.x;
With the typo fixed:
Reviewed-by: Daniel Martin <consume.noise at gmail.com>
More information about the wayland-devel
mailing list