diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-22 17:30:14 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-22 17:30:14 +1030 |
commit | f9269bebae27bbc9d0e03e02943166b83946623d (patch) | |
tree | 8bba08ee9391ec60613a58cf8941e65f18e82d58 /dix/devices.c | |
parent | 9ed43eff48201520797f89a12bb3b2f5819bd99f (diff) |
DeviceIntRec: move lastx/lasty from valuator into DeviceIntRec.
We free the ValuatorClassRec quite regularly. If a SIGIO is handled while
we're swapping device classes, we can bring the server down when we try to
access lastx/lasty of the master device.
Diffstat (limited to 'dix/devices.c')
-rw-r--r-- | dix/devices.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/dix/devices.c b/dix/devices.c index 7d889a2c1..98cd290e2 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -505,9 +505,9 @@ CorePointerProc(DeviceIntPtr pDev, int what) GetMotionHistory, (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; - pDev->valuator->lastx = pDev->valuator->axisVal[0]; + pDev->lastx = pDev->valuator->axisVal[0]; pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; - pDev->valuator->lasty = pDev->valuator->axisVal[1]; + pDev->lasty = pDev->valuator->axisVal[1]; classes->key = pDev->key; classes->valuator = pDev->valuator; @@ -1226,8 +1226,6 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, valc->mode = mode; valc->axes = (AxisInfoPtr)(valc + 1); valc->axisVal = (int *)(valc->axes + numAxes); - valc->lastx = 0; - valc->lasty = 0; valc->dxremaind = 0; valc->dyremaind = 0; dev->valuator = valc; |