[PATCH libinput 2/2] evdev-mt-touchpad: tp_current_touch: Fix off by one error

Peter Hutterer peter.hutterer at who-t.net
Wed Jun 18 17:09:48 PDT 2014


On Wed, Jun 18, 2014 at 02:22:24PM +0200, Hans de Goede wrote:
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  src/evdev-mt-touchpad.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
> index 0294eb2..92e0651 100644
> --- a/src/evdev-mt-touchpad.c
> +++ b/src/evdev-mt-touchpad.c
> @@ -139,7 +139,7 @@ tp_motion_history_reset(struct tp_touch *t)
>  static inline struct tp_touch *
>  tp_current_touch(struct tp_dispatch *tp)
>  {
> -	return &tp->touches[min(tp->slot, tp->ntouches)];
> +	return &tp->touches[min(tp->slot, tp->ntouches - 1)];
>  }
>  
>  static inline struct tp_touch *
> -- 
> 2.0.0

merged, thanks. one minor comment: we dropped the old touchpad driver now,
so a prefix of "touchpad:" is enough. I've changed that before pushing.

Cheers,
   Peter




More information about the wayland-devel mailing list