[PATCH xf86-input-synaptics] Reset open slots array on device disable

Peter Hutterer peter.hutterer at who-t.net
Wed May 16 19:02:55 PDT 2012


On Wed, May 16, 2012 at 07:49:25AM -0700, Chase Douglas wrote:
> The open slots array is used for clickpad cumulative delta computation.
> If the array is not reset and becomes corrupted during the device
> disable/enable cycle, the cumulative deltas may be wrong. This manifests
> as jumpy cursor behavior on some clickpads after suspend/resume.
> 
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
>  src/synaptics.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/synaptics.c b/src/synaptics.c
> index 77eb5be..cc76c76 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -1104,6 +1104,7 @@ SynapticsReset(SynapticsPrivate *priv)
>      priv->lastButtons = 0;
>      priv->prev_z = 0;
>      priv->prevFingers = 0;
> +    memset(priv->open_slots, 0, priv->num_slots * sizeof(int));
>  }

merged and ported, though I admit I don't see any differences on my
touchpad.
  
Cheers,
  Peter


More information about the xorg-devel mailing list