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.
This commit is contained in:
Peter Hutterer 2008-05-25 10:38:33 +09:30
parent ba557e0263
commit 096117cf02

View File

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