diff options
author | Adam Jackson <ajax@nwnk.net> | 2006-02-20 22:16:49 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2006-02-20 22:16:49 +0000 |
commit | 6d7083bd69724586338d79784655328f1fcd2ae5 (patch) | |
tree | 59f85a0e3892d181bffc5dba78e040e91b838a27 /Xi/grabdevb.c | |
parent | 5480c537cee79b324736eac3e438a4713dfa1036 (diff) |
indent fixes (OMG SO UGLY), and nuke old RCS keywords.
Diffstat (limited to 'Xi/grabdevb.c')
-rw-r--r-- | Xi/grabdevb.c | 97 |
1 files changed, 44 insertions, 53 deletions
diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c index b976244ef..4333550f1 100644 --- a/Xi/grabdevb.c +++ b/Xi/grabdevb.c @@ -1,5 +1,3 @@ -/* $Xorg: grabdevb.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ - /************************************************************ Copyright 1989, 1998 The Open Group @@ -45,7 +43,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdevb.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * @@ -59,15 +56,15 @@ SOFTWARE. #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ +#include <X11/X.h> /* for inputstr.h */ +#include <X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ #include <X11/extensions/XI.h> #include <X11/extensions/XIproto.h> #include "exevents.h" #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ +#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "grabdev.h" @@ -92,16 +89,15 @@ SProcXGrabDeviceButton(register ClientPtr client) swapl(&stuff->grabWindow, n); swaps(&stuff->modifiers, n); swaps(&stuff->event_count, n); - p = (long *) &stuff[1]; - for (i=0; i<stuff->event_count; i++) - { - swapl(p, n); + p = (long *)&stuff[1]; + for (i = 0; i < stuff->event_count; i++) { + swapl(p, n); p++; - } - - return(ProcXGrabDeviceButton(client)); } + return (ProcXGrabDeviceButton(client)); +} + /*********************************************************************** * * Grab a button on an extension device. @@ -111,58 +107,53 @@ SProcXGrabDeviceButton(register ClientPtr client) int ProcXGrabDeviceButton(ClientPtr client) { - int ret; - DeviceIntPtr dev; - DeviceIntPtr mdev; - XEventClass *class; - struct tmask tmp[EMASKSIZE]; + int ret; + DeviceIntPtr dev; + DeviceIntPtr mdev; + XEventClass *class; + struct tmask tmp[EMASKSIZE]; REQUEST(xGrabDeviceButtonReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); - if (stuff->length !=(sizeof(xGrabDeviceButtonReq)>>2) + stuff->event_count) - { - SendErrorToClient (client, IReqCode, X_GrabDeviceButton, 0, BadLength); + if (stuff->length != + (sizeof(xGrabDeviceButtonReq) >> 2) + stuff->event_count) { + SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, BadLength); return Success; - } + } - dev = LookupDeviceIntRec (stuff->grabbed_device); - if (dev == NULL) - { - SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, - BadDevice); + dev = LookupDeviceIntRec(stuff->grabbed_device); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, BadDevice); return Success; - } - if (stuff->modifier_device != UseXKeyboard) - { - mdev = LookupDeviceIntRec (stuff->modifier_device); - if (mdev == NULL) - { - SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, - BadDevice); + } + if (stuff->modifier_device != UseXKeyboard) { + mdev = LookupDeviceIntRec(stuff->modifier_device); + if (mdev == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, + BadDevice); return Success; - } - if (mdev->key == NULL) - { - SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, - BadMatch); + } + if (mdev->key == NULL) { + SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, + BadMatch); return Success; - } } - else + } else mdev = (DeviceIntPtr) LookupKeyboardDevice(); class = (XEventClass *) (&stuff[1]); /* first word of values */ - if ((ret = CreateMaskFromList (client, class, - stuff->event_count, tmp, dev, X_GrabDeviceButton)) != Success) - return Success; - ret = GrabButton(client, dev, stuff->this_device_mode, - stuff->other_devices_mode, stuff->modifiers, mdev, stuff->button, - stuff->grabWindow, stuff->ownerEvents, (Cursor)0, (Window)0, - tmp[stuff->grabbed_device].mask); + if ((ret = CreateMaskFromList(client, class, + stuff->event_count, tmp, dev, + X_GrabDeviceButton)) != Success) + return Success; + ret = GrabButton(client, dev, stuff->this_device_mode, + stuff->other_devices_mode, stuff->modifiers, mdev, + stuff->button, stuff->grabWindow, stuff->ownerEvents, + (Cursor) 0, (Window) 0, tmp[stuff->grabbed_device].mask); if (ret != Success) SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, ret); - return(Success); - } + return (Success); +} |