Commit 8e188629 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mihai Moldovan

Xi: small formatting changes to match Xorg 7.1's Xi

parent b0abdf7b
......@@ -309,6 +309,7 @@ ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
if (mask & DvAutoRepeatMode) {
int inx = (key >> 3);
int kmask = (1 << (key & 7));
t = (CARD8) f->auto_repeat_mode;
if (t == AutoRepeatModeOff) {
if (key == DO_ALL)
......
......@@ -96,7 +96,7 @@ ProcXDeviceBell(register ClientPtr client)
int base;
int newpercent;
CARD8 class;
void *ctrl;
void * ctrl;
BellProcPtr proc;
REQUEST(xDeviceBellReq);
......@@ -125,7 +125,7 @@ ProcXDeviceBell(register ClientPtr client)
}
base = k->ctrl.bell;
proc = k->BellProc;
ctrl = (void *)&(k->ctrl);
ctrl = (void *) &(k->ctrl);
class = KbdFeedbackClass;
} else if (stuff->feedbackclass == BellFeedbackClass) {
for (b = dev->bell; b; b = b->next)
......@@ -138,7 +138,7 @@ ProcXDeviceBell(register ClientPtr client)
}
base = b->ctrl.percent;
proc = b->BellProc;
ctrl = (void *)&(b->ctrl);
ctrl = (void *) &(b->ctrl);
class = BellFeedbackClass;
} else {
client->errorValue = stuff->feedbackclass;
......
......@@ -130,9 +130,10 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
}
if (DeviceEventCallback) {
DeviceEventInfoRec eventinfo;
eventinfo.events = (xEventPtr) xE;
eventinfo.count = count;
CallCallbacks(&DeviceEventCallback, (void *)&eventinfo);
CallCallbacks(&DeviceEventCallback, (void *) & eventinfo);
}
for (i = 1; i < count; i++)
if ((++xV)->type == DeviceValuator) {
......@@ -320,6 +321,7 @@ FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
}
if (v) {
int nval = v->numAxes - first;
ev->classes_reported |= (1 << ValuatorClass);
ev->classes_reported |= (dev->valuator->mode << ModeBitsShift);
ev->num_valuators = nval < 3 ? nval : 3;
......@@ -660,7 +662,7 @@ AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx)
others->resource = FakeClientID(client->index);
others->next = pWin->optional->inputMasks->inputClients;
pWin->optional->inputMasks->inputClients = others;
if (!AddResource(others->resource, RT_INPUTCLIENT, (void *)pWin))
if (!AddResource(others->resource, RT_INPUTCLIENT, (void *) pWin))
return BadAlloc;
return Success;
}
......@@ -721,6 +723,7 @@ int
InputClientGone(register WindowPtr pWin, XID id)
{
register InputClientsPtr other, prev;
if (!wOtherInputMasks(pWin))
return (Success);
prev = 0;
......@@ -1131,6 +1134,7 @@ MaybeStopDeviceHint(register DeviceIntPtr dev, ClientPtr client)
{
WindowPtr pWin;
GrabPtr grab = dev->grab;
pWin = dev->valuator->motionHintWindow;
if ((grab && SameClient(grab, client) &&
......
......@@ -822,7 +822,7 @@ IResetProc(ExtensionEntry * unused)
*
*/
void
void
AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name)
{
dev->type = type;
......
......@@ -51,7 +51,6 @@ SOFTWARE.
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
......@@ -147,7 +146,6 @@ ProcXGrabDevice(ClientPtr client)
return Success;
}
/***********************************************************************
*
* This procedure creates an event mask from a list of XEventClasses.
......
......@@ -121,7 +121,7 @@ ProcXListInputDevices(register ClientPtr client)
SizeDeviceInfo(d, &namesize, &size);
total_length = numdevs * sizeof(xDeviceInfo) + size + namesize;
devbuf = (char *)calloc(1, total_length);
devbuf = (char *) calloc (1, total_length);
classbuf = devbuf + (numdevs * sizeof(xDeviceInfo));
namebuf = classbuf + size;
savbuf = devbuf;
......
......@@ -163,7 +163,7 @@ ProcXOpenDevice(register ClientPtr client)
rep.length = (j * sizeof(xInputClassInfo) + 3) >> 2;
rep.num_classes = j;
WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep);
WriteToClient(client, j * sizeof(xInputClassInfo), evbase);
WriteToClient(client, j * sizeof (xInputClassInfo), evbase);
return (Success);
}
......
......@@ -51,6 +51,7 @@ SOFTWARE.
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
......
......@@ -106,7 +106,7 @@ SProcXSendExtensionEvent(register ClientPtr client)
*eventP = eventT;
}
p = (CARD32 *) (((xEvent *) & stuff[1]) + stuff->num_events);
p = (CARD32 *)(((xEvent *) & stuff[1]) + stuff->num_events);
SwapLongs(p, stuff->count);
return (ProcXSendExtensionEvent(client));
}
......
......@@ -128,7 +128,6 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
SendErrorToClient(client, IReqCode, X_SetDeviceModifierMapping, 0, ret);
}
return Success;
}
......
......@@ -99,7 +99,6 @@ ChangeKeyboardDevice(DeviceIntPtr old_dev, DeviceIntPtr new_dev)
return BadMatch;
}
/***********************************************************************
*
* Caller: ProcXChangePointerDevice
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment