Commit graph

15 commits

Author SHA1 Message Date
Peter Hutterer
2edc7e37ac test: mark the protocol A device as touch device
Now that we're emulating everything correctly, let's mark it as proper touch
device.

Two test cases need to be excluded:
- double-down triggers an assert in the test device because this isn't
  possible this way with protocol A devices
- the axisrange warning test can't be triggered, mtdev clips those axes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-22 16:23:17 +10:00
Peter Hutterer
44702e947c test: switch the protocol A test device to be an actual protocol A device
This device mostly behaved like a normal touch device except for
SYN_MT_REPORT. Switch it to behave like a real protocol A device and adjust
the test accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-22 16:23:17 +10:00
Peter Hutterer
9b18adc407 test: replace != NULL checks with ck_assert_notnull
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-02-15 08:42:15 +10:00
Peter Hutterer
500d03d78e fallback: cancel touches, don't just release them when we suspend
When we disable the touch device, any existing touches should be cancelled,
not just released.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-27 10:27:19 +10:00
Peter Hutterer
e09c822fd1 udev: re-instate the model-quirks callout
This was removed accidentally as part of a9ef4ba1f3 and then completely dropped in
870ddce9e4 when the hwdb was deprecated completely. The model quirks call
is also the one that reads and sets the LIBINPUT_FUZZ property, effectively
making that code a noop.

Fixes #138

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-10 15:57:27 +10:00
Peter Hutterer
7768d7d981 test: drop the sleep_ms argument
This forces events for every ~10ms now. If we want a slower movement, we need
more steps - just like a real touchpad does it.

Cocinelle spatch files were variants of:
	@@
	expression A, B, C, D, E, F, G, H, I, J, K;
	@@

	- litest_touch_move_two_touches(A, B, C, D, E, F, G, H, I)
	+ litest_touch_move_two_touches(A, B, C, D, E, F, G, H)

The only test that needed a real fix was touchpad_no_palm_detect_2fg_scroll,
it used 12ms before, now it's using 10ms so on the bcm5974 touchpad the second
finger was a speed-thumb. Increasing the events and thus slowing down the
pointer means it's a normal finger and the test succeeds again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-08-28 11:26:12 +10:00
Peter Hutterer
da0fbb580f fallback: add support for ABS_MT_TOOL_TYPE for touch screens
Cancel any touches that trigger MT_TOOL_PALM.

Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/25

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-08-03 14:21:18 +10:00
Peter Hutterer
63e5372190 Add libinput_device_touch_get_touch_count()
This makes it possible for callers to detect whether a touch device is
single or multitouch (or even check for things like dual-touch vs real
multi-touch) and adjust the interface accordingly.

Note that this is for touch devices only, not touchpads that are just pointer
devices.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-01 09:38:24 +10:00
Peter Hutterer
08d85350cb test: add a test for a touchscreen with out-of-range axes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-16 17:04:46 +10:00
Peter Hutterer
ce80e40006 test: move all the _setup() functions into a special section
This way we can loop through them instead of having to add them manually.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 10:17:52 +10:00
Peter Hutterer
32a671edcf test: add a test for removing a touch device with a finger still down
https://bugs.freedesktop.org/show_bug.cgi?id=102385

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-28 14:25:17 +10:00
Peter Hutterer
dcbf2c2a44 test: don't leak test warnings to stdout
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 10:53:50 +10:00
Peter Hutterer
3108653e0a test: tighten some test cases
Instead of just waiting for events, use a libinput_dispatch() and assume the
event is there when we want it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-01 09:52:31 +10:00
Peter Hutterer
2908ba98cd test: add test for touch seat slots
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-06 11:47:56 +10:00
Peter Hutterer
5d66edc9f4 test: prefix all test source files with "test-"
They weren't originally prefixed but the various tests were, but now that we
only have one test runner binary anyway, the prefix helps sorting the files
easily within e.g. gcov results.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-16 08:59:00 +10:00
Renamed from test/touch.c (Browse further)