aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xi/ungrdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/ungrdev.c')
-rw-r--r--nx-X11/programs/Xserver/Xi/ungrdev.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/nx-X11/programs/Xserver/Xi/ungrdev.c b/nx-X11/programs/Xserver/Xi/ungrdev.c
index ea7f0f6f1..e84a1c3aa 100644
--- a/nx-X11/programs/Xserver/Xi/ungrdev.c
+++ b/nx-X11/programs/Xserver/Xi/ungrdev.c
@@ -55,13 +55,13 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <nx-X11/X.h> /* for inputstr.h */
-#include <nx-X11/Xproto.h> /* Request macro */
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
+#include <nx-X11/X.h> /* for inputstr.h */
+#include <nx-X11/Xproto.h> /* Request macro */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
#include <nx-X11/extensions/XIproto.h>
#include "extnsionst.h"
-#include "extinit.h" /* LookupDeviceIntRec */
+#include "extinit.h" /* LookupDeviceIntRec */
#include "exglobals.h"
#include "ungrdev.h"
@@ -73,15 +73,14 @@ SOFTWARE.
*/
int
-SProcXUngrabDevice(client)
-register ClientPtr client;
- {
+SProcXUngrabDevice(register ClientPtr client)
+{
REQUEST(xUngrabDeviceReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
swapl(&stuff->time);
- return(ProcXUngrabDevice(client));
- }
+ return (ProcXUngrabDevice(client));
+}
/***********************************************************************
*
@@ -90,28 +89,26 @@ register ClientPtr client;
*/
int
-ProcXUngrabDevice(client)
-register ClientPtr client;
- {
- DeviceIntPtr dev;
- GrabPtr grab;
- TimeStamp time;
+ProcXUngrabDevice(register ClientPtr client)
+{
+ DeviceIntPtr dev;
+ GrabPtr grab;
+ TimeStamp time;
REQUEST(xUngrabDeviceReq);
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
- dev = LookupDeviceIntRec (stuff->deviceid);
- if (dev == NULL)
- {
+ dev = LookupDeviceIntRec(stuff->deviceid);
+ if (dev == NULL) {
SendErrorToClient(client, IReqCode, X_UngrabDevice, 0, BadDevice);
return Success;
- }
- grab = dev->grab;
+ }
+ grab = dev->grab;
time = ClientTimeToServerTime(stuff->time);
if ((CompareTimeStamps(time, currentTime) != LATER) &&
(CompareTimeStamps(time, dev->grabTime) != EARLIER) &&
(grab) && SameClient(grab, client))
- (*dev->DeactivateGrab)(dev);
+ (*dev->DeactivateGrab) (dev);
return Success;
- }
+}