mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-19 00:51:16 +00:00
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:
parent
d22c25bda4
commit
0b88510069
4 changed files with 111 additions and 25 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue