On 15/06/2014 03:48 , Alexander E. Patrakov wrote:
14.06.2014 20:44, Gabriele Mazzotta wrote:
On Saturday 14 June 2014 17:47:27, Alexander E. Patrakov
<[email protected]> 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".

the polling rate is 80Hz, which makes it 12.5 ms, so your analysis looks pretty spot-on. The problem is: I'm not a big fan of having some magic threshold in the driver that applies to everything. I was hoping that we can look at the timestamps of the events and the history of previous events and detect when there is such a jump going on.

I don't have direct solution, so this is just thinking aloud: the event sequence you're likely to get is a number of events grouped together, then an event outside of that group, followed by a number of events closely grouped together. If we can reliably make that detection we should be able to insert the required touch up/down with a bit of delay before replaying the events correctly.

Again, this isn't a real solution yet, but maybe it helps with an idea (or at least an approach) to tackle this.

Cheers,
  Peter
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to