[PATCH libinput 02/11] test: force a pressure of 0 when we hover a touch
Peter Hutterer
peter.hutterer at who-t.net
Mon Jan 30 00:58:38 UTC 2017
As we switch to pressure-based touch detection, we need for all
pressure-capable touchpads to send pressure values. They'll do so by filling
in an axis default but that breaks our current hover code.
Make sure the hover litest helpers force a pressure of 0.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
test/litest.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/test/litest.c b/test/litest.c
index 1bb18dd..21afaf9 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -1799,7 +1799,13 @@ litest_hover_start(struct litest_device *d,
double x,
double y)
{
- litest_slot_start(d, slot, x, y, NULL, 0);
+ struct axis_replacement axes[] = {
+ {ABS_MT_PRESSURE, 0 },
+ {ABS_PRESSURE, 0 },
+ {-1, -1 },
+ };
+
+ litest_slot_start(d, slot, x, y, axes, 0);
}
void
@@ -1838,7 +1844,13 @@ void
litest_hover_move(struct litest_device *d, unsigned int slot,
double x, double y)
{
- litest_slot_move(d, slot, x, y, NULL, false);
+ struct axis_replacement axes[] = {
+ {ABS_MT_PRESSURE, 0 },
+ {ABS_PRESSURE, 0 },
+ {-1, -1 },
+ };
+
+ litest_slot_move(d, slot, x, y, axes, false);
}
void
--
2.9.3
More information about the wayland-devel
mailing list