aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/gtmotion.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 20:12:58 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 20:12:58 +0000
commit2553bdd7c359cd87525d367761c86932cec5adff (patch)
treeae71245933c98474a699d3e392de5820879b2018 /xorg-server/Xi/gtmotion.c
parente2c51f2ee7b0a3ea1a052fc49324057b4a4bbc78 (diff)
parent4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (diff)
downloadvcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.gz
vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.bz2
vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.zip
svn merge file:///D:/svnrepos/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/Xi/gtmotion.c')
-rw-r--r--xorg-server/Xi/gtmotion.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/xorg-server/Xi/gtmotion.c b/xorg-server/Xi/gtmotion.c
index 4f4d7cb77..8fa0cca29 100644
--- a/xorg-server/Xi/gtmotion.c
+++ b/xorg-server/Xi/gtmotion.c
@@ -95,7 +95,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
INT32 *coords = NULL, *bufptr;
xGetDeviceMotionEventsReply rep;
unsigned long i;
- int rc, num_events, axes, size = 0, tsize;
+ int rc, num_events, axes, size = 0;
unsigned long nEvents;
DeviceIntPtr dev;
TimeStamp start, stop;
@@ -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);
@@ -132,14 +132,10 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
stop = currentTime;
num_events = v->numMotionEvents;
if (num_events) {
- size = sizeof(Time) + (axes * sizeof(INT32));
- tsize = num_events * size;
- coords = (INT32 *) xalloc(tsize);
- if (!coords)
- return BadAlloc;
- rep.nEvents = (v->GetMotionProc) (dev, (xTimecoord *) coords, /* XXX */
- start.milliseconds, stop.milliseconds,
- (ScreenPtr) NULL);
+ size = sizeof(Time) + (axes * sizeof(INT32));
+ rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords,/* XXX */
+ start.milliseconds, stop.milliseconds,
+ (ScreenPtr) NULL, FALSE);
}
if (rep.nEvents > 0) {
length = (rep.nEvents * size + 3) >> 2;