summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-05-26 17:23:34 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-05-26 17:27:32 +0930
commit5fe57787faa2ea4f2f57b25455d200bf924206d6 (patch)
tree43d4fcf55827fcabe8e8d9be8ab6186ff6295899
parent1883485edd7eb90c0b76bca41c71e26ae2c0b91a (diff)
dix: store the absolute values in the motion history.
The core protocol requires absolute values and it's a bit hard to get them if we only have relative ones in the history. Switch the motion history to absolute, and if we really need the relative values, we can probably generated them from the abs. ones in the future.
-rw-r--r--Xi/gtmotion.c2
-rw-r--r--dix/getevents.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c
index 7cc5c2670..ce1312e90 100644
--- a/Xi/gtmotion.c
+++ b/Xi/gtmotion.c
@@ -119,7 +119,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.nEvents = 0;
rep.axes = axes;
- rep.mode = v->mode & DeviceMode;
+ rep.mode = Absolute; /* XXX we don't do relative at the moment */
rep.length = 0;
start = ClientTimeToServerTime(stuff->start);
stop = ClientTimeToServerTime(stuff->stop);
diff --git a/dix/getevents.c b/dix/getevents.c
index 643e97763..b5657a86e 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1003,10 +1003,11 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
y = rescaleValuatorAxis(pDev->last.valuators[1], NULL,
pDev->valuator->axes + 1, scr->height);
- updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators);
+ updateMotionHistory(pDev, ms, first_valuator, num_valuators,
+ &pDev->last.valuators[first_valuator]);
if (master)
updateMotionHistory(master, ms, first_valuator, num_valuators,
- valuators);
+ &pDev->last.valuators[first_valuator]);
/* Update the valuators with the true value sent to the client*/
if(v0) *v0 = x;