Bug 104188

Summary: Two-finger clickfinger recognised as middle-click when touch-size based palm rejection is active
Product: Wayland Reporter: Peter Y. Chuang <peteryuchuang>
Component: libinputAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: hugo, nate, peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: evemu-record of two-finger clickfinger when a palm is on the touchpad
0001-touchpad-ignore-palm-touches-when-handling-clickfing.patch
evemu-record of two-finger clickfinger when a palm is on the touchpad v.2
evemu-record of three-finger clickfinger when a palm is on the touchpad

Description Peter Y. Chuang 2017-12-10 07:22:42 UTC
Created attachment 136062 [details]
evemu-record of two-finger clickfinger when a palm is on the touchpad

Two-finger clickfinger is recognised as middle-click instead of right-click when a palm is rested on the touchpad, similar to bug103210 in some way.

One-finger and Three-finger clickfingers, however, behave correctly.

I've replayed the recording on my non-MacBook machine with "libinput debug-events --set-click-method=clickfinger", and it shows BTN_MIDDLE events. Hopefully we won't encounter the problem in bug103809 again.
Comment 1 Peter Hutterer 2017-12-13 06:11:28 UTC
looks to be an easier problem. tp_clickfinger_set_button() just takes nfingers_down which includes palm touches. Hence the mis-count.
Comment 2 Peter Hutterer 2017-12-19 06:05:45 UTC
Created attachment 136270 [details] [review]
0001-touchpad-ignore-palm-touches-when-handling-clickfing.patch

Still need to write test cases for it but I think this one should be it?
Comment 3 Peter Y. Chuang 2017-12-20 07:43:56 UTC
Created attachment 136309 [details]
evemu-record of two-finger clickfinger when a palm is on the touchpad v.2

I've tested the patch, and it works for the most part. Though there are now miscount of fingers of a different kind.

In this new recording, I record a series of two-finger clicks on different places of the touchpad while my palm is on. Some of the two-finger clicks appear to be recognised as left clicks instead.
Comment 4 Peter Y. Chuang 2017-12-20 07:46:50 UTC
Created attachment 136310 [details]
evemu-record of three-finger clickfinger when a palm is on the touchpad

There are occasional miscounts with three-finger clicks as well. Sometimes they are recognised as right clicks, and more rarely as left clicks.
Comment 5 Peter Hutterer 2018-01-08 06:15:00 UTC
(In reply to Peter Y. Chuang from comment #3)
> In this new recording, I record a series of two-finger clicks on different
> places of the touchpad while my palm is on. Some of the two-finger clicks
> appear to be recognised as left clicks instead.

it appears that in all the left-click cases a second finger is also detected as palm, based on the touch size. so libinput thinks it's two palms + 1 finger, not one palm + 2 fingers. I suspect the same is true for the other attachement.
Comment 6 Peter Hutterer 2018-02-02 05:27:51 UTC
so, how are we going to proceed here? Judging by the last evemu-record it's a bit out of our hands now because if we can't rely on the touch size then we have general problems. But we seem to have gone down from always broken to occasionally broken, right?
Comment 7 Peter Y. Chuang 2018-02-09 17:36:03 UTC
Sorry for the late reply. I guess I will take it for now.
Comment 8 Peter Hutterer 2018-04-17 01:58:10 UTC
Closing based on comment #7
Comment 9 Peter Y. Chuang 2018-04-17 07:29:58 UTC
(In reply to Peter Hutterer from comment #8)
> Closing based on comment #7

Quick question: is the patch in git master?
Comment 10 Peter Hutterer 2018-04-17 07:39:09 UTC
oops, no, apparently not. sorry about that.
Comment 11 Peter Hutterer 2018-04-19 23:32:08 UTC
ok, this time:

commit cfa921250d143c130103d460a6c487575bd54239
Author: Peter Hutterer <>
Date:   Tue Dec 19 14:54:53 2017 +1000

     touchpad: ignore palm touches when handling clickfingers

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.