tools: pass the userdata to the context

The event-gui needs this but it got dropped in
6ee8c585, causing a crash. Oops.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: switch touch points around for semi-mt tap-n-drag testing

The tests ignored it when motion events never happened - but that's mostly
what these tests are about. This only happened for semi-mt devices that use
the bounding box only, not separate touch points. Switching the touch points
around that the bounding box doesn't interfere causes the test to work as
expected.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: add helper function for checking for a specific event type

In a few tests we care about that a specific set of events are in the queue
but not about the details of the events (usually checked elsewhere). Instead
of manual loops, provide a helper function that also checks that there is at
least one of those events in the queue.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: switch tests to use the new helper function

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
touchpad: rename scroll.state to scroll.edge_state

In preparation for a twofinger_state field, to avoid confusion.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
touchpad: revert to pointer movement when stopping twofinger scrolling

Add a boolean state machine for two-finger scrolling so we know when we're
currently scrolling. If we were scrolling and it stops, pick the active
touch as pointer touch so we can go back to pointer movement without having to
lift the finger off the touchpad.

https://bugs.freedesktop.org/show_bug.cgi?id=86807

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Declare libinput.sym as dependency

We want to rebuild whenever it changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Add libinput_set_user_data

Previously, the pointer could only be passed into the context on creation
time and was immutable after that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>