summaryrefslogtreecommitdiff
path: root/Xi/ungrdevb.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-02-20 22:16:49 +0000
committerAdam Jackson <ajax@nwnk.net>2006-02-20 22:16:49 +0000
commit6d7083bd69724586338d79784655328f1fcd2ae5 (patch)
tree59f85a0e3892d181bffc5dba78e040e91b838a27 /Xi/ungrdevb.c
parent5480c537cee79b324736eac3e438a4713dfa1036 (diff)
indent fixes (OMG SO UGLY), and nuke old RCS keywords.
Diffstat (limited to 'Xi/ungrdevb.c')
-rw-r--r--Xi/ungrdevb.c85
1 files changed, 35 insertions, 50 deletions
diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c
index 6851930b7..64bb213f5 100644
--- a/Xi/ungrdevb.c
+++ b/Xi/ungrdevb.c
@@ -1,5 +1,3 @@
-/* $Xorg: ungrdevb.c,v 1.4 2001/02/09 02:04:35 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/ungrdevb.c,v 3.3 2001/01/17 22:13:26 dawes Exp $ */
/***********************************************************************
*
@@ -59,14 +56,14 @@ 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 "extnsionst.h"
-#include "extinit.h" /* LookupDeviceIntRec */
+#include "extinit.h" /* LookupDeviceIntRec */
#include "exglobals.h"
#include "dixgrabs.h"
@@ -92,8 +89,8 @@ SProcXUngrabDeviceButton(register ClientPtr client)
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
swapl(&stuff->grabWindow, n);
swaps(&stuff->modifiers, n);
- return(ProcXUngrabDeviceButton(client));
- }
+ return (ProcXUngrabDeviceButton(client));
+}
/***********************************************************************
*
@@ -104,62 +101,50 @@ SProcXUngrabDeviceButton(register ClientPtr client)
int
ProcXUngrabDeviceButton(ClientPtr client)
{
- DeviceIntPtr dev;
- DeviceIntPtr mdev;
- WindowPtr pWin;
- GrabRec temporaryGrab;
+ DeviceIntPtr dev;
+ DeviceIntPtr mdev;
+ WindowPtr pWin;
+ GrabRec temporaryGrab;
REQUEST(xUngrabDeviceButtonReq);
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
- dev = LookupDeviceIntRec (stuff->grabbed_device);
- if (dev == NULL)
- {
- SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
- BadDevice);
+ dev = LookupDeviceIntRec(stuff->grabbed_device);
+ if (dev == NULL) {
+ SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadDevice);
return Success;
- }
- if (dev->button == NULL)
- {
- SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
- BadMatch);
+ }
+ if (dev->button == NULL) {
+ SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadMatch);
return Success;
- }
+ }
- if (stuff->modifier_device != UseXKeyboard)
- {
- mdev = LookupDeviceIntRec (stuff->modifier_device);
- if (mdev == NULL)
- {
- SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
- BadDevice);
+ if (stuff->modifier_device != UseXKeyboard) {
+ mdev = LookupDeviceIntRec(stuff->modifier_device);
+ if (mdev == NULL) {
+ SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
+ BadDevice);
return Success;
- }
- if (mdev->key == NULL)
- {
- SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
- BadMatch);
+ }
+ if (mdev->key == NULL) {
+ SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
+ BadMatch);
return Success;
- }
}
- else
+ } else
mdev = (DeviceIntPtr) LookupKeyboardDevice();
pWin = LookupWindow(stuff->grabWindow, client);
- if (!pWin)
- {
- SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
- BadWindow);
+ if (!pWin) {
+ SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadWindow);
return Success;
- }
+ }
if ((stuff->modifiers != AnyModifier) &&
- (stuff->modifiers & ~AllModifiersMask))
- {
- SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
- BadValue);
+ (stuff->modifiers & ~AllModifiersMask)) {
+ SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadValue);
return Success;
- }
+ }
temporaryGrab.resource = client->clientAsMask;
temporaryGrab.device = dev;
@@ -173,4 +158,4 @@ ProcXUngrabDeviceButton(ClientPtr client)
DeletePassiveGrabFromList(&temporaryGrab);
return Success;
- }
+}