[PATCH libinput 3/6] touchpad: make gestures optional

Hans de Goede hdegoede at redhat.com
Fri Jul 31 01:43:54 PDT 2015


Hi,

On 31-07-15 01:25, Peter Hutterer wrote:
> On Thu, Jul 30, 2015 at 02:29:18PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 30-07-15 08:11, Peter Hutterer wrote:
>>> Not all multi-finger touchpads are able to reliably produce gestures, so make
>>> it optional. This patch just adds a boolean (currently always true) that gets
>>> set on touchpad init time, i.e. it is not run-time configurable.
>>>
>>> Three and four-finger gestures are filtered out in gesture_notify(), if the
>>> cap isn't set the event is discarded.
>>>
>>> For two-finger gestures we prevent a transition to PINCH, so we don't
>>> inadvertently detect a pinch gesture and then not send events. This way, a 2fg
>>> gesture is always scroll.
>>
>> Shouldn't we just always treat 2 fingers down as scroll then ? I think that
>> one of the main reasons to disable gestures would be pinch mis-detection
>> when users really want to scroll, and doing things this way disabling
>> gestures will not help this case.
>
> I thought about that when doing the patch but decided for this approach on
> purpose.  currently, a mis-detection of a pinch gesture with gestures
> enabled means the gesture remains until the fingers are lifted. with this
> patch otoh it just doesn't do anything until we detect a scroll gesture, at
> which point we switch to scrolling.

I see that is a valid point.

>
> the point here is that the scroll detection code is still at work, so
> hopefully that "trains" users to perform the right scroll action. we get
> consistent behaviour across touchpads too this way, and we avoid the
> situations down the track of "it used to scroll this way but now it doesn't
> anymore" when we add other features, or when we manage do to gestures
> reliably on those touchpads after all.
>
> I might be overthinking this though :)

You are :)

But I can see the logic in not training users to use the "wrong" kind of 2fg
gestures for scrolling, so lets go with your approach:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans


More information about the wayland-devel mailing list