Bug 48316

Summary: Potential incorrect ClickFinger count on three finger click
Product: xorg Reporter: Allan McRae <allan>
Component: Input/synapticsAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
0001-Don-t-count-fingers-twice-when-guessing-distance-483.patch none

Description Allan McRae 2012-04-04 20:49:50 UTC
Commit 420e0abe (Guess the number of clickpad ClickFingers based on finger distance) introduced limiting the number of fingers involved in a multifinger click by putting a maximum distance between pairs of fingers.

However, with a three finger click, with all fingers close together, all three possible pairs of fingers can be separated by less the tested distance.  Thus a click involving four fingers is reported.

This leads to a situation where you are required to three finger click with your fingers not too close together, but also not too far apart...
Comment 1 Allan McRae 2012-04-04 20:55:30 UTC
This could be fixed by adding something like:

if(nfingers > hw->num_mt_mask - 1) nfingers = hw->num_mt_mask - 1;

above the return statement in clickpad_guess_clickfingers.  This would have the advantage of allowing the percentage touchpad width that pairs of fingers are required to be within to be increased, as 30% is quite small for some touchpads.
Comment 2 Peter Hutterer 2012-04-09 22:28:50 UTC
Created attachment 59706 [details] [review]
0001-Don-t-count-fingers-twice-when-guessing-distance-483.patch

I don't have hardware to test this, please do so. You'll also need http://patchwork.freedesktop.org/patch/9827/ for the new define.
Comment 3 Allan McRae 2012-04-10 17:55:48 UTC
That patch corrects the overcounting of fingers issue.  Now when I three finger click, three or less fingers are detected (depending on separation).
Comment 4 Peter Hutterer 2012-04-11 18:13:41 UTC
New patch, fixes bug in previous algorithm: http://patchwork.freedesktop.org/patch/9906/
Comment 5 Peter Hutterer 2012-04-15 16:29:04 UTC
commit f68ddd9be4202333a1c3ccf536966a96dc0bfde7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 10 13:06:49 2012 +1000

    Don't count fingers twice when guessing distance (#48316)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.