aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/setmode.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi/setmode.c')
-rw-r--r--xorg-server/Xi/setmode.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/xorg-server/Xi/setmode.c b/xorg-server/Xi/setmode.c
index 80ee764b0..a7bf1eaff 100644
--- a/xorg-server/Xi/setmode.c
+++ b/xorg-server/Xi/setmode.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
@@ -99,27 +99,26 @@ ProcXSetDeviceMode(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
if (dev->valuator == NULL)
- return BadMatch;
+ return BadMatch;
if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client))
- rep.status = AlreadyGrabbed;
+ rep.status = AlreadyGrabbed;
else
- rep.status = SetDeviceMode(client, dev, stuff->mode);
+ rep.status = SetDeviceMode(client, dev, stuff->mode);
if (rep.status == Success)
valuator_set_mode(dev, VALUATOR_MODE_ALL_AXES, stuff->mode);
- else if (rep.status != AlreadyGrabbed)
- {
- switch(rep.status) {
- case BadMatch:
- case BadImplementation:
- case BadAlloc:
- break;
- default:
- rep.status = BadMode;
- }
- return rep.status;
+ else if (rep.status != AlreadyGrabbed) {
+ switch (rep.status) {
+ case BadMatch:
+ case BadImplementation:
+ case BadAlloc:
+ break;
+ default:
+ rep.status = BadMode;
+ }
+ return rep.status;
}
WriteReplyToClient(client, sizeof(xSetDeviceModeReply), &rep);
@@ -138,5 +137,5 @@ SRepXSetDeviceMode(ClientPtr client, int size, xSetDeviceModeReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}