59
56
#include <dix-config.h>
62
#include <X11/X.h> /* for inputstr.h */
63
#include <X11/Xproto.h> /* Request macro */
64
#include "inputstr.h" /* DeviceIntPtr */
59
#include <X11/X.h> /* for inputstr.h */
60
#include <X11/Xproto.h> /* Request macro */
61
#include "inputstr.h" /* DeviceIntPtr */
65
62
#include <X11/extensions/XI.h>
66
63
#include <X11/extensions/XIproto.h>
68
65
#include "extnsionst.h"
69
#include "extinit.h" /* LookupDeviceIntRec */
66
#include "extinit.h" /* LookupDeviceIntRec */
70
67
#include "exglobals.h"
72
69
#include "allowev.h"
82
SProcXAllowDeviceEvents(client)
83
register ClientPtr client;
79
SProcXAllowDeviceEvents(register ClientPtr client)
87
83
REQUEST(xAllowDeviceEventsReq);
88
84
swaps(&stuff->length, n);
89
85
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
90
86
swapl(&stuff->time, n);
91
return(ProcXAllowDeviceEvents(client));
87
return (ProcXAllowDeviceEvents(client));
94
90
/***********************************************************************
101
ProcXAllowDeviceEvents(client)
102
register ClientPtr client;
105
DeviceIntPtr thisdev;
97
ProcXAllowDeviceEvents(register ClientPtr client)
100
DeviceIntPtr thisdev;
107
102
REQUEST(xAllowDeviceEventsReq);
108
103
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
110
thisdev = LookupDeviceIntRec (stuff->deviceid);
105
thisdev = LookupDeviceIntRec(stuff->deviceid);
106
if (thisdev == NULL) {
113
107
SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadDevice);
116
110
time = ClientTimeToServerTime(stuff->time);
120
case ReplayThisDevice:
121
AllowSome(client, time, thisdev, NOT_GRABBED);
124
AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
126
case AsyncThisDevice:
127
AllowSome(client, time, thisdev, THAWED);
129
case AsyncOtherDevices:
130
AllowSome(client, time, thisdev, THAW_OTHERS);
133
AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
136
AllowSome(client, time, thisdev, THAWED_BOTH);
139
SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0,
141
client->errorValue = stuff->mode;
112
switch (stuff->mode) {
113
case ReplayThisDevice:
114
AllowSome(client, time, thisdev, NOT_GRABBED);
117
AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
119
case AsyncThisDevice:
120
AllowSome(client, time, thisdev, THAWED);
122
case AsyncOtherDevices:
123
AllowSome(client, time, thisdev, THAW_OTHERS);
126
AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
129
AllowSome(client, time, thisdev, THAWED_BOTH);
132
SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadValue);
133
client->errorValue = stuff->mode;