From 0f834b91a4768673833ab4917e87d86c237bb1a6 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 23 Mar 2012 10:05:55 +0100 Subject: libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update 23 Mar 2012 --- xorg-server/Xi/xigrabdev.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'xorg-server/Xi/xigrabdev.c') 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 #endif -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ #include #include -#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); } -- cgit v1.2.3