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