touchpad: Put state unrolling code in a tp_clear_state() helper function
authorHans de Goede <hdegoede@redhat.com>
Tue, 16 Sep 2014 14:22:40 +0000 (16:22 +0200)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 18 Sep 2014 22:20:03 +0000 (08:20 +1000)
commit0f434cf73b13feda70b0741a653df6f0225fb904
treecfb9d2f7d2f6b67d9b038daebec69e40d75feb5f
parent8f20c07a1f0c465317f77d21304d7afaadb1b4a8
touchpad: Put state unrolling code in a tp_clear_state() helper function

For touchpads with top softbuttons we don't want to fully disable the touchpad
on suspend, as we want to keep the top softbuttons working for the trackpoint.

So in the suspended state some of the touchpad sub-statemachines will keep
running (e.g. buttons) where others (e.g. tap) will not. This means that
we will need to clear the touchpad state on resume too, to avoid things
being in an inconsistent state after resume.

This commit factors out the state clearing code into a helper functions, so
that the same code can be used on resume.

No functional changes.

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