Skip to content

Improve two finger pinch detection

novenary requested to merge 9ary/libinput:pinch into main

This should hopefully address #550 (closed) and #566 (closed). In my limited testing this change is a huge improvement for two finger pinch, which was previously very frustrating to trigger, and hopefully does not interfere with other functionality.

The general idea of the patch is that I've added a 300ms grace period during which thumb rejection can be cancelled (if the thumb moves at least 1.5mm) and two finger scroll can transition to two finger pinch (if it turns out the fingers are not actually moving in the same direction). The current implementation is ugly I'm sure, I would appreciate feedback on how to improve it, especially regarding where to move the thumb rejection bit.

I'll be running this patch on my machine for a while to see how it performs in real world use.

Edited by novenary

Merge request reports