Ensure the motion history is merged for master devices.

Add each event to the master's MH as well as to the SDs. In the MD, store
min/max and the actual value. When retrieving the MH, rescale all coordinates
to the current coordinate range and only post those valuators that are
currently active on the device.
This commit is contained in:
Peter Hutterer 2008-05-26 13:53:45 +09:30
commit 0b88510069
4 changed files with 111 additions and 25 deletions

View file

@ -571,12 +571,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
v = to->valuator;
if (!v)
FatalError("[Xi] no memory for class shift.\n");
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->numAxes = from->valuator->numAxes;
v->axes = (AxisInfoPtr)&v[1];
memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo));