tablet: add assert that deltas are always 0

The tablet axis struct has a delta field that's only useful for the events,
not for our internal axis handling. Make sure we never set it to anything
nonzero.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
This commit is contained in:
Peter Hutterer 2017-03-07 16:37:55 +10:00
parent 88876e66fa
commit a19d18f9c6

View file

@ -1479,6 +1479,9 @@ tablet_send_events(struct tablet_dispatch *tablet,
tablet_check_notify_axes(tablet, device, tool, &axes, time);
}
assert(tablet->axes.delta.x == 0);
assert(tablet->axes.delta.y == 0);
tablet_send_proximity_in(tablet, tool, device, &axes, time);
if (!tablet_send_tip(tablet, tool, device, &axes, time))
tablet_send_axes(tablet, tool, device, &axes, time);