touchpad: Protect tp_begin_touch and tp_end_touch against being called twice
authorHans de Goede <hdegoede@redhat.com>
Fri, 18 Jul 2014 09:06:36 +0000 (11:06 +0200)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 21 Jul 2014 10:20:49 +0000 (20:20 +1000)
commitb64fb73ace5a01576670571200f14cf1275a6bd7
tree5bef3c7ca7b6de0960a2f870676a45336b144e17
parent0915c2c51a8b3c86c8a19abe9e572af5b58bd4ec
touchpad: Protect tp_begin_touch and tp_end_touch against being called twice

They were already protected against being called twice between SYN_REPORT, but not
for being called twice before a SYN_REPORT arrives.

This allows simplifying tp_process_fake_touch a bit. Note while at it also
also flip the if condition in tp_process_fake_touch so that the if is
true when the finger is down, and remove the bogus t->state = TOUCH_NONE.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad.c