[PATCH synaptics 2/2] Reset scroll delta when finger is lifted

Chase Douglas chase.douglas at canonical.com
Wed Apr 25 22:37:26 PDT 2012


On 04/25/2012 08:00 PM, Peter Hutterer wrote:
> Provides for a more consistent scrolling experience, otherwise delta
> leftovers may trigger extra events even when the actual scrolling action
> stays the same.
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  src/synaptics.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/synaptics.c b/src/synaptics.c
> index 0546ab9..429f5d0 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -2414,6 +2414,8 @@ HandleScrolling(SynapticsPrivate *priv, struct SynapticsHwState *hw,
>  		DBG(7, "circular scroll detected on edge\n");
>  	    }
>  	}
> +        priv->scroll.delta_y = 0;
> +        priv->scroll.delta_x = 0;
>      }
>      if (!priv->circ_scroll_on) {
>  	if (finger) {

This path is followed when a finger begins contact, not when a finger is
lifted. I'm guessing it is correct, though, because we want to reset the
scroll deltas when we start a new motion?

-- Chase


More information about the xorg-devel mailing list