From 096117cf023dc92dcadc91677931fc6ad1feb4a0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 25 May 2008 10:38:33 +0930 Subject: [PATCH] Xi: reset motion history when swapping device classes. This isn't really the correct solution, but it'll have to do until I figured out how to transfer the history over correctly. --- Xi/exevents.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index a48ba115d..f13959fc9 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -574,6 +574,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) memcpy(v, from->valuator, sizeof(ValuatorClassRec)); v->motion = NULL; AllocateMotionHistory(to); /*XXX should be copied somehow */ + v->first_motion = 0; + v->last_motion = 0; v->axes = (AxisInfoPtr)&v[1]; memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo));