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

Alexander E. Patrakov patrakov at gmail.com
Sat Jun 14 10:48:59 PDT 2014


14.06.2014 20:44, Gabriele Mazzotta wrote:
> 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?

Not quite. The most common scenario (for me) where a huge jump or 
sometimes a huge scroll event is generated is:

1. I decide to place the pointer somewhere and left-click.
2. I place the right index finger on the touchpad.
3. I move the pointer approximately near the desired position, which 
often happens to be near the center of the touchpad.
4. I do two things simultaneously:
4a. I direct my left index finger to the left virtual button, with the 
intention to click.
4b. I finish the right index finger movement, with the intention to 
bring the pointer exactly to the correct position and then to remove the 
finger.
5. The following two events happen in unpredictable order, because I 
don't really care about the order:
5a. I remove the right-hand index finger from the touchpad.
5b. I place the left-hand index finger on the touchpad in the left 
virtual-button area.
6. I click using the left index finger.

If events 5a and 5b are separated by less than, say, 20 ms, the touchpad 
misreports them: it says "the finger moved from the center to the 
bottom-left corner" (i.e. reuses the tracking ID), instead of "one touch 
disappeared in the center, and one appeared in the corner".

> If I do that with my laptop,
> a scrolling event is sometimes generated, but no jumps.

Based on your words below, I think that you have misunderstood the bug 
description.

> 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.

Heh, you have reproduced my problem description. Indeed, I don't need to 
click. It's just that the most common scenario where one finger is 
removed and the other is added shortly thereafter is most commonly 
encountered while positioning the pointer and clicking. So we are 
actually talking about the same issue.

-- 
Alexander E. Patrakov


More information about the xorg-devel mailing list