[PATCH synaptics] Add movement constraints to clickpads to prevent cursor jumps

Gabriele Mazzotta gabriele.mzt at gmail.com
Sat Jun 14 07:44:10 PDT 2014


On Saturday 14 June 2014 17:47:27, Alexander E. Patrakov <patrakov at gmail.com> wrote:
> 13.06.2014 15:22, Gabriele Mazzotta wrote:
> > It appears that 71652fe ("Ignore motion the first X ms after a
> > clickpad click") is not enough to prevent unwanted cursor jumps when
> > two different fingers are used to respectively move the cursor and
> > click. The jumps are due to the small delay between the actual click and
> > the moment the finger is placed on the clickpad. Because of this delay,
> > the two events are sometimes seen as independent from each other and
> > since the finger detection happens first, the motion is not ignored.
> 
> > Add a constraint on the distance covered to prevent jumps.
> > The difference between two detections along the x axis has to be
> > smaller than 1/4 of the clickpad width and smaller than 1/4 of the
> > height along the y axis.
> 
> See also https://bugs.freedesktop.org/show_bug.cgi?id=76722 for a 
> similar bug in libinput. In that case, though, I was able to trace it to 
> a touchpad firmware bug.

What I understood from your bug report is that you have jumps even when both 
the fingers are on the touchpad, is that correct? If I do that with my laptop, 
a scrolling event is sometimes generated, but no jumps.
I have jumps only if the touchpad is touched only by one finger. I can 
reproduce this problem even without clicking, I just need to touch very 
quickly two different areas in sequence. I hence guess that my problem is due 
to the fact that the touchpad look for fingers every X milliseconds and if I'm 
faster than it, it doesn't notice that I removed one finger and started to use 
another.
The final result is the same though, the click happens in a wrong position.

> > Signed-off-by: Gabriele Mazzotta <gabriele.mzt at gmail.com>
> > ---
> > This patch was tested on a Dell XPS13 9333. I don't know if 1/4 of the
> > width and 1/4 of the height are good constraints, on my laptop I couldn't
> > notice any side effect even with stricter constraints.
> 
> In my patch for libinput (see the attachment to 
> http://lists.freedesktop.org/archives/wayland-devel/2014-March/013935.html) 
> I used 1/8 of the diagonal.

I chose 1/4 of the width and height instead of the diagonal for simplicity and 
it seemed to be enough to prevent jumps. I must say that I stopped using two 
fingers because of this bug, so maybe something more restricting is required, 
I just did several tests which don't necessarily reflect the normal use case.


More information about the xorg-devel mailing list