From d6d3999ccb2cb72d55820770260172eccbbb68d7 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 16 Apr 2012 09:17:34 +0200 Subject: libX11 xserver pixman mesa git update 16 Apr 2012 --- xorg-server/Xi/gtmotion.c | 48 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'xorg-server/Xi/gtmotion.c') diff --git a/xorg-server/Xi/gtmotion.c b/xorg-server/Xi/gtmotion.c index 34f167b40..48bc79af4 100644 --- a/xorg-server/Xi/gtmotion.c +++ b/xorg-server/Xi/gtmotion.c @@ -54,7 +54,7 @@ SOFTWARE. #include #endif -#include "inputstr.h" /* DeviceIntPtr */ +#include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exevents.h" @@ -103,51 +103,51 @@ ProcXGetDeviceMotionEvents(ClientPtr client) REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); if (rc != Success) - return rc; + return rc; v = dev->valuator; if (v == NULL || v->numAxes == 0) - return BadMatch; + return BadMatch; if (dev->valuator->motionHintWindow) - MaybeStopDeviceHint(dev, client); + MaybeStopDeviceHint(dev, client); axes = v->numAxes; rep.repType = X_Reply; rep.RepType = X_GetDeviceMotionEvents; rep.sequenceNumber = client->sequence; rep.nEvents = 0; rep.axes = axes; - rep.mode = Absolute; /* XXX we don't do relative at the moment */ + rep.mode = Absolute; /* XXX we don't do relative at the moment */ rep.length = 0; start = ClientTimeToServerTime(stuff->start); stop = ClientTimeToServerTime(stuff->stop); if (CompareTimeStamps(start, stop) == LATER || - CompareTimeStamps(start, currentTime) == LATER) { - WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); - return Success; + CompareTimeStamps(start, currentTime) == LATER) { + WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); + return Success; } if (CompareTimeStamps(stop, currentTime) == LATER) - stop = currentTime; + stop = currentTime; num_events = v->numMotionEvents; if (num_events) { size = sizeof(Time) + (axes * sizeof(INT32)); - rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords,/* XXX */ - start.milliseconds, stop.milliseconds, - (ScreenPtr) NULL, FALSE); + rep.nEvents = GetMotionHistory(dev, (xTimecoord **) & coords, /* XXX */ + start.milliseconds, stop.milliseconds, + (ScreenPtr) NULL, FALSE); } if (rep.nEvents > 0) { - length = bytes_to_int32(rep.nEvents * size); - rep.length = length; + length = bytes_to_int32(rep.nEvents * size); + rep.length = length; } nEvents = rep.nEvents; WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); if (nEvents) { - if (client->swapped) { - bufptr = coords; - for (i = 0; i < nEvents * (axes + 1); i++) { - swapl(bufptr); - bufptr++; - } - } - WriteToClient(client, length * 4, (char *)coords); + if (client->swapped) { + bufptr = coords; + for (i = 0; i < nEvents * (axes + 1); i++) { + swapl(bufptr); + bufptr++; + } + } + WriteToClient(client, length * 4, (char *) coords); } free(coords); return Success; @@ -162,10 +162,10 @@ ProcXGetDeviceMotionEvents(ClientPtr client) void SRepXGetDeviceMotionEvents(ClientPtr client, int size, - xGetDeviceMotionEventsReply * rep) + xGetDeviceMotionEventsReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->nEvents); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, (char *) rep); } -- cgit v1.2.3