summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-03-07 16:37:55 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-03-23 10:18:09 +1000
commita19d18f9c68ebe962731964f177427a1c16b7ca8 (patch)
treee440925e47925b35a39c21dbff3223ef34899d60 /src
parent88876e66fab67eae3c7aa75a4e19479df556b08f (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/evdev-tablet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 1120598..413fb42 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -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);