aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/xigrabdev.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/Xi/xigrabdev.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/Xi/xigrabdev.c')
-rw-r--r--xorg-server/Xi/xigrabdev.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/xorg-server/Xi/xigrabdev.c b/xorg-server/Xi/xigrabdev.c
index 2b3055004..8d2cf0bed 100644
--- a/xorg-server/Xi/xigrabdev.c
+++ b/xorg-server/Xi/xigrabdev.c
@@ -33,12 +33,12 @@
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
#include <X11/extensions/XI2.h>
#include <X11/extensions/XI2proto.h>
-#include "exglobals.h" /* BadDevice */
+#include "exglobals.h" /* BadDevice */
#include "exevents.h"
#include "xigrabdev.h"
#include "inpututils.h"
@@ -73,12 +73,12 @@ ProcXIGrabDevice(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
if (ret != Success)
- return ret;
+ return ret;
if (!IsMaster(dev))
stuff->paired_device_mode = GrabModeAsync;
- if (XICheckInvalidMaskBits(client, (unsigned char*)&stuff[1],
+ if (XICheckInvalidMaskBits(client, (unsigned char *) &stuff[1],
stuff->mask_len * 4) != Success)
return BadValue;
@@ -88,17 +88,15 @@ ProcXIGrabDevice(ClientPtr client)
mask_len = min(xi2mask_mask_size(mask.xi2mask), stuff->mask_len * 4);
/* FIXME: I think the old code was broken here */
- xi2mask_set_one_mask(mask.xi2mask, dev->id, (unsigned char*)&stuff[1], mask_len);
+ xi2mask_set_one_mask(mask.xi2mask, dev->id, (unsigned char *) &stuff[1],
+ mask_len);
ret = GrabDevice(client, dev, stuff->grab_mode,
stuff->paired_device_mode,
stuff->grab_window,
stuff->owner_events,
stuff->time,
- &mask,
- XI2,
- stuff->cursor,
- None /* confineTo */,
+ &mask, XI2, stuff->cursor, None /* confineTo */ ,
&status);
xi2mask_free(&mask.xi2mask);
@@ -112,7 +110,6 @@ ProcXIGrabDevice(ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.status = status;
-
WriteReplyToClient(client, sizeof(rep), &rep);
return ret;
}
@@ -141,22 +138,23 @@ ProcXIUngrabDevice(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (ret != Success)
- return ret;
+ return ret;
grab = dev->deviceGrab.grab;
time = ClientTimeToServerTime(stuff->time);
if ((CompareTimeStamps(time, currentTime) != LATER) &&
- (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) &&
- (grab) && SameClient(grab, client) && grab->grabtype == XI2)
- (*dev->deviceGrab.DeactivateGrab) (dev);
+ (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) &&
+ (grab) && SameClient(grab, client) && grab->grabtype == XI2)
+ (*dev->deviceGrab.DeactivateGrab) (dev);
return Success;
}
-void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep)
+void
+SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}