aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xi/allowev.c
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2018-02-26 01:00:54 +0100
committerMihai Moldovan <ionic@ionic.de>2018-02-26 01:00:54 +0100
commit05152b788ab184f45df1f64182791c88a09dc6f9 (patch)
tree4232012c65ee251fef529950a420689154778847 /nx-X11/programs/Xserver/Xi/allowev.c
parente247900edd20c140faf42ba0759bf59cbd2f75ae (diff)
parent4598c0c3d215f7f2237a9ccee3a143025f2af005 (diff)
downloadnx-libs-05152b788ab184f45df1f64182791c88a09dc6f9.tar.gz
nx-libs-05152b788ab184f45df1f64182791c88a09dc6f9.tar.bz2
nx-libs-05152b788ab184f45df1f64182791c88a09dc6f9.zip
Merge branch 'uli42-pr/update_xi' into arctica-3.6.x
Attributes GH PR #644: https://github.com/ArcticaProject/nx-libs/pull/644
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/allowev.c')
-rw-r--r--nx-X11/programs/Xserver/Xi/allowev.c85
1 files changed, 40 insertions, 45 deletions
diff --git a/nx-X11/programs/Xserver/Xi/allowev.c b/nx-X11/programs/Xserver/Xi/allowev.c
index a814e3c3d..8981f9142 100644
--- a/nx-X11/programs/Xserver/Xi/allowev.c
+++ b/nx-X11/programs/Xserver/Xi/allowev.c
@@ -55,14 +55,14 @@ 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 <nx-X11/X.h> /* for inputstr.h */
+#include <nx-X11/Xproto.h> /* Request macro */
+#include "inputstr.h" /* DeviceIntPtr */
#include <nx-X11/extensions/XI.h>
#include <nx-X11/extensions/XIproto.h>
#include "extnsionst.h"
-#include "extinit.h" /* LookupDeviceIntRec */
+#include "extinit.h" /* LookupDeviceIntRec */
#include "exglobals.h"
#include "allowev.h"
@@ -75,15 +75,14 @@ SOFTWARE.
*/
int
-SProcXAllowDeviceEvents(client)
- register ClientPtr client;
- {
+SProcXAllowDeviceEvents(register ClientPtr client)
+{
REQUEST(xAllowDeviceEventsReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
swapl(&stuff->time);
- return(ProcXAllowDeviceEvents(client));
- }
+ return (ProcXAllowDeviceEvents(client));
+}
/***********************************************************************
*
@@ -92,48 +91,44 @@ SProcXAllowDeviceEvents(client)
*/
int
-ProcXAllowDeviceEvents(client)
- register ClientPtr client;
- {
- TimeStamp time;
- DeviceIntPtr thisdev;
+ProcXAllowDeviceEvents(register ClientPtr client)
+{
+ TimeStamp time;
+ DeviceIntPtr thisdev;
REQUEST(xAllowDeviceEventsReq);
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
- thisdev = LookupDeviceIntRec (stuff->deviceid);
- if (thisdev == NULL)
- {
+ thisdev = LookupDeviceIntRec(stuff->deviceid);
+ if (thisdev == NULL) {
SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadDevice);
return Success;
- }
+ }
time = ClientTimeToServerTime(stuff->time);
- switch (stuff->mode)
- {
- case ReplayThisDevice:
- AllowSome(client, time, thisdev, NOT_GRABBED);
- break;
- case SyncThisDevice:
- AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
- break;
- case AsyncThisDevice:
- AllowSome(client, time, thisdev, THAWED);
- break;
- case AsyncOtherDevices:
- AllowSome(client, time, thisdev, THAW_OTHERS);
- break;
- case SyncAll:
- AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
- break;
- case AsyncAll:
- AllowSome(client, time, thisdev, THAWED_BOTH);
- break;
- default:
- SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0,
- BadValue);
- client->errorValue = stuff->mode;
- return Success;
- }
- return Success;
+ switch (stuff->mode) {
+ case ReplayThisDevice:
+ AllowSome(client, time, thisdev, NOT_GRABBED);
+ break;
+ case SyncThisDevice:
+ AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
+ break;
+ case AsyncThisDevice:
+ AllowSome(client, time, thisdev, THAWED);
+ break;
+ case AsyncOtherDevices:
+ AllowSome(client, time, thisdev, THAW_OTHERS);
+ break;
+ case SyncAll:
+ AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
+ break;
+ case AsyncAll:
+ AllowSome(client, time, thisdev, THAWED_BOTH);
+ break;
+ default:
+ SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadValue);
+ client->errorValue = stuff->mode;
+ return Success;
}
+ return Success;
+}