summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-25 01:09:19 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-25 01:09:19 +0300
commitb9e180e632d04bf685ade9e32bd0b20882794486 (patch)
treece97ef1db9fd1a0f84c48cc75934e63601cc6fb0 /dix
parent5b38eb69cdaa154791c7f74e35dbe4d3256b19bd (diff)
port all users to the new DIX motion history API
Port KDrive, Xvfb, and Xnest, as well as the virtual core devices, to the new motion history API. Make GetPointerEvents also update the history.
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c5
-rw-r--r--dix/getevents.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 86e1e7a25..a5110fffa 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -285,10 +285,9 @@ CorePointerProc(DeviceIntPtr pDev, int what)
case DEVICE_INIT:
for (i = 1; i <= 32; i++)
map[i] = i;
- /* we don't keep history, for now. */
InitPointerDeviceStruct((DevicePtr)pDev, map, 32,
- NULL, (PtrCtrlProcPtr)NoopDDA,
- 0, 2);
+ GetMotionHistory, (PtrCtrlProcPtr)NoopDDA,
+ GetMotionHistorySize(), 2);
pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2;
pDev->valuator->lastx = pDev->valuator->axisVal[0];
pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2;
diff --git a/dix/getevents.c b/dix/getevents.c
index 8e22ad6a6..0a228cd01 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -591,6 +591,8 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
valuators[1 - first_valuator] = y;
+ updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators);
+
if (pDev->coreEvents) {
cp->valuator->lastx = x;
cp->valuator->lasty = y;