[PATCH libinput v4 1/5] Fix debouncing algorithm

Peter Hutterer peter.hutterer at who-t.net
Tue Nov 14 04:12:56 UTC 2017


This is a work based on Vicente Bergas' debouncing code. It uses the same
algorithm for debouncing but instead of 'normal' code it reverts to a simple
state machine for the decisions when to debounce and when to just forward an
event. This is similar to the tap state machine which, albeit huge, is a lot
easier to debug than normal code.

The branch is available here, together with the SVG that shows the state
machine (in doc/button-debouncing-state-machine.svg)
https://github.com/whot/libinput/tree/wip/button-debouncing-v3

To make it possible we needed some rework in the fallback interface to
switch from event-oriented processing to event-frame oriented processing
(that we already use in the touchpad and tablet backends).

Cheers,
  Peter


More information about the wayland-devel mailing list