test: force a pressure of 0 when we hover a touch

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@who-t.net>
This commit is contained in:
Peter Hutterer 2017-01-11 09:49:37 +10:00
parent 7c8cecdb02
commit 618ee6ac94

View file

@ -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