Skip to content

Draft: Request for feedback: Add three-finger touch dragging with drag-lock timeout

abc def requested to merge abcdef/libinput:resumable-3fd into main

This is my attempt at resumable three-finger dragging with a drag-lock timeout, and with an initial button press delay when fingers don't move.

Intended behavior is basically described in #298.

In short, three fingers on touchpad performs primary button press and moves cursor. If you don't move the fingers after applying them the button press will happen after a short delay, otherwise it happens as soon as there's movement. A reduction to one or zero fingers will start a timeout before which you can continue the drag by applying 3 fingers again. Performing a 1 or 2 finger movement during that timeout breaks out of the drag and initiates cursor movement or scrolling, respectively, without affecting the position where the button is released.

I'm hoping for some thoughts on these points:

  • Logic/correctness, semantics (I've mostly just assumed what the symbols are meant for)
  • Apparent misunderstandings -- extensive comments are there to hopefully make this obvious
  • Answers to the questions and issues identified in the comments (mostly prefixed with // or TODO)
  • Optionally, thoughts on eventually moving it to its own FSM instead of shoehorning it into tap.c (there are possible further additions to the feature) -- does it fit where it is? Pros/cons?

Too early at this point:

  • Style, cleanup
  • Feature configs
  • General merge-readiness
Edited by abc def

Merge request reports