evdev: Keep track of button/key press count per device
authorJonas Ådahl <jadahl@gmail.com>
Sun, 27 Jul 2014 13:54:49 +0000 (15:54 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Mon, 18 Aug 2014 20:35:19 +0000 (22:35 +0200)
commit3a3d70a3a895140b91c58bc305c90ee3f9268346
treed2c20bd568dda4e3bbc20b63b395b711a22a4591
parentc8017595fcb9fafd15c2c638c55f72f389da411a
evdev: Keep track of button/key press count per device

Keep track of the number of times a given button or key is pressed on a
device. For regular mouse devices or keyboard devices, such a count will
never exceed 1, but counting button presses could help when button
presses with the same code can originate from different sources. One could
for example implement overlapping tap-drags with button presses by
having them deal with their own life-time independently, sorting out
when the user should receive button presses or not depending on the
pressed count.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad-buttons.c
src/evdev-mt-touchpad-tap.c
src/evdev.c
src/evdev.h