aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xi/gtmotion.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-02-15 21:25:27 +0100
committerMihai Moldovan <ionic@ionic.de>2018-02-26 00:58:46 +0100
commitb0abdf7bd8284b1edf39c13e1863ecc420fd68e4 (patch)
tree191171d5cfdee1851ad3b5246be6363f9d1f3445 /nx-X11/programs/Xserver/Xi/gtmotion.c
parent7aca428ffe10b2cffca8fe01962aef421a5a5645 (diff)
downloadnx-libs-b0abdf7bd8284b1edf39c13e1863ecc420fd68e4.tar.gz
nx-libs-b0abdf7bd8284b1edf39c13e1863ecc420fd68e4.tar.bz2
nx-libs-b0abdf7bd8284b1edf39c13e1863ecc420fd68e4.zip
Xi: reformat
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/gtmotion.c')
-rw-r--r--nx-X11/programs/Xserver/Xi/gtmotion.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/nx-X11/programs/Xserver/Xi/gtmotion.c b/nx-X11/programs/Xserver/Xi/gtmotion.c
index 870d87fb9..72209d1b4 100644
--- a/nx-X11/programs/Xserver/Xi/gtmotion.c
+++ b/nx-X11/programs/Xserver/Xi/gtmotion.c
@@ -107,15 +107,13 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
dev = LookupDeviceIntRec(stuff->deviceid);
- if (dev == NULL)
- {
+ if (dev == NULL) {
SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0,
BadDevice);
return Success;
}
v = dev->valuator;
- if (v==NULL || v->numAxes == 0)
- {
+ if (v == NULL || v->numAxes == 0) {
SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0,
BadMatch);
return Success;
@@ -133,16 +131,14 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
start = ClientTimeToServerTime(stuff->start);
stop = ClientTimeToServerTime(stuff->stop);
if (CompareTimeStamps(start, stop) == LATER ||
- CompareTimeStamps(start, currentTime) == LATER)
- {
+ CompareTimeStamps(start, currentTime) == LATER) {
WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
return Success;
}
if (CompareTimeStamps(stop, currentTime) == LATER)
stop = currentTime;
num_events = v->numMotionEvents;
- if (num_events)
- {
+ if (num_events) {
size = sizeof(Time) + (axes * sizeof(INT32));
tsize = num_events * size;
coords = (INT32 *) malloc(tsize);
@@ -152,24 +148,20 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
BadAlloc);
return Success;
}
- rep.nEvents = (v->GetMotionProc) (
- dev, (xTimecoord *)coords, /* XXX */
- start.milliseconds, stop.milliseconds, (ScreenPtr)NULL);
+ rep.nEvents = (v->GetMotionProc) (dev, (xTimecoord *) coords, /* XXX */
+ start.milliseconds, stop.milliseconds,
+ (ScreenPtr) NULL);
}
- if (rep.nEvents > 0)
- {
+ if (rep.nEvents > 0) {
length = (rep.nEvents * size + 3) >> 2;
rep.length = length;
}
nEvents = rep.nEvents;
WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
- if (nEvents)
- {
- if (client->swapped)
- {
+ if (nEvents) {
+ if (client->swapped) {
bufptr = coords;
- for (i=0; i<nEvents * (axes+1); i++)
- {
+ for (i = 0; i < nEvents * (axes + 1); i++) {
swapl(bufptr);
bufptr++;
}