test: drop unused includes for libinput-util.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: use check's strcmp API instead of strcmp

Prints out the strings on failure - easier for debugging

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
touchpad: log the invalid event as bug, not just as info

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
touchpad: Prefix tap-debugging message

For consistency with the butto state debugging

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
timer.h: Add #include libinput-util.h

libinput-util.h is needed for the linked list definitions.

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>
Add a log_msg_va function

This is useful for when we use libraries which want us to provide them with
a logging callback.

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>
touchpad: always call into the the tap state machine

A button event consumed by the softbutton or clickpad code does not feed into
the tap state machine, leaving it in its current state. The touch generating
that event however may have triggered state changes.

For some tap/click combinations this gives us either double press/release
events or an inconsistent order of events. Those issues include:
* a really short physical click causes a click + tap-click
* a really short physical click on the right software button causes a right
  click + left tap-click
* tap + click causes double button left press events

To avoid these, notify the tap code that a button event has occured and
process that accordingly. Depending on the state this may either continue to
the DEAD state or release the current tap button and then go to the DEAD
state.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
test: add litest_assert_empty_queue helper function

Checks if the queue is empty and prints informatino about any events before
failing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
test: add a bunch of test for click behavior on touchpads

Mainly testing the behaviour when clicking during a tap or tap-n-drag. Adds a
new "feature" to the litest system, Apple clickpads don't have software
buttons by default.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
test: add clickpad software button tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
test: Add description for the T440 synaptics touchpad

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
test: add a couple of top software button test

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>