1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
|
'\" t
.\" Title: xiallowevents
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 09/05/2024
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "XIALLOWEVENTS" "libmansuffix" "09/05/2024" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
XIAllowEvents \- Release queued events
.SH "SYNOPSIS"
.sp
.nf
#include <X11/extensions/XInput2\&.h>
.fi
.sp
.nf
Status XIAllowEvents( Display *display,
int deviceid,
int event_mode,
Time time );
.fi
.sp
.nf
Status XIAllowTouchEvents( Display *dpy,
int deviceid,
unsigned int touchid,
Window grab_window,
int event_mode );
.fi
.sp
.nf
display
Specifies the connection to the X server\&.
.fi
.sp
.nf
device
Specifies the device that is to be grabbed or released
.fi
.sp
.nf
event_mode
Specifies whether a device is to be thawed and events are to be
replayed, or how to handle a grabbed touch sequence\&.
.fi
.sp
.nf
time
A valid server time or CurrentTime\&.
.fi
.sp
.nf
touchid
The ID of the touch sequence to accept or reject\&. The value is ignored
for event modes other than AcceptTouch and RejectTouch\&.
.fi
.sp
.nf
grab_window
The window on which to accept or reject a touch sequence grab\&. The value
is ignored for event modes other than AcceptTouch and RejectTouch\&.
.fi
.SH "DESCRIPTION"
.sp
.if n \{\
.RS 4
.\}
.nf
The XIAllowEvents request releases some queued events if the client
has caused a device to freeze\&. It also is used to handle touch grab and
ownership processing\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
The function has no effect if the specified time is earlier than the last\-grab
time of the most recent active grab for the client, or if the specified time is
later than the current X server time\&. The time parameter must be CurrentTime for
requests with event modes of XIAcceptTouch and XIRejectTouch\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
The following describes the processing that occurs depending on what constant
you pass to the event_mode argument:
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
XIAsyncDevice:
If the specified device is frozen by the client, event processing for that
device continues as usual\&. If the device is frozen multiple times by the
client on behalf of multiple separate grabs, XIAsyncDevice thaws for
all\&. XIAsyncDevice has no effect if the specified device is not frozen
by the client, but the device need not be grabbed by the client\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
XISyncDevice:
If the specified device is frozen and actively grabbed by the client,
event processing for that device continues normally until the next
button press or release, or key press or release, or a gesture begin or end
event (depending on the grab) is reported to the client\&.
At this time, the specified device again appears to freeze\&.
However, if the reported event causes the grab to be released, the
specified device does not freeze\&.
XISyncDevice has no effect if the specified device is not frozen by the
client or is not grabbed by the client\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
XIReplayDevice:
If the specified device is actively grabbed by the client and is frozen
as the result of an event having been sent to the client (either from
the activation of a XIGrabButton or from a previous XIAllowEvents with
mode SyncDevice, but not from a Grab), the grab is released and
that event is completely reprocessed\&. This time, however, the request
ignores any passive grabs at or above (towards the root) the
grab window of the grab just released\&.
The request has no effect if the specified device is not grabbed by
the client or if it is not frozen as the result of an event\&.
In case of gesture begin event being replayed, the original grabbing
client will receive a XI_GesturePinchEnd or XI_GestureSwipeEnd event\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
XIAsyncPairedDevice:
If the paired master device is frozen by the client, event processing
for it continues as usual\&. If the paired device is frozen multiple
times by the client on behalf of multiple separate grabs,
XIAsyncPairedDevice thaws for all\&.
XIAsyncPairedDevice has no effect if the device is not frozen by the
client, but those devices need not be grabbed by the client\&.
XIAsyncPairedDevice has no effect if deviceid specifies a slave device\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
XISyncPair:
If both the device and the paired master device are frozen by the
client, event processing (for both devices) continues normally until
the next XI_ButtonPress, XI_ButtonRelease, XI_KeyPress, or XI_KeyRelease
event is reported to the client for a grabbed device (button event for
a pointer, key event for a keyboard), at which time the devices again
appear to freeze\&. However, if the reported event causes the grab to be
released, then the devices do not freeze (but if the other device is
still grabbed, then a subsequent event for it will still cause both
devices to freeze)\&.
XISyncPair has no effect unless both the device and the paired master
device are frozen by the client\&. If the device or paired master device
is frozen twice by the client on behalf of two separate grabs,
XISyncPair thaws for both (but a subsequent freeze for XISyncPair will
only freeze each device once)\&.
XISyncPair has no effect if deviceid specifies a slave device\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
XIAsyncPair:
If the device and the paired master device are frozen by the client,
event processing for both devices continues normally\&. If a device is
frozen twice by the client on behalf of two separate grabs, AsyncBoth
thaws for both\&. XIAsyncPair has no effect unless both the device and the
paired master device frozen by the client\&.
XIAsyncPair has no effect if deviceid specifies a slave device\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
XIAcceptTouch:
The client is deemed to have taken control of the touch sequence once it
owns the sequence\&. TouchEnd events will be sent to all clients listening
to the touch sequence that have either grabbed the touch sequence on a
child window of the grab_window or have received events for the touch
sequence through event selection\&. These clients will no longer receive
any TouchUpdate events\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
XIRejectTouch:
The client is no longer interested in the touch sequence, and will
receive a XI_TouchEnd event\&. If the client is the current owner of the
sequence, ownership will be passed on to the next listener\&.
.fi
.if n \{\
.RE
.\}
.SH "DIAGNOSTICS"
.sp
.if n \{\
.RS 4
.\}
.nf
BadDevice
An invalid deviceid was specified\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
BadAccess
This error may occur if event_mode is XIAcceptTouch and this client
is not the current or potential owner of the specified touch ID\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
BadValue
This error may occur if event_mode is XIAcceptTouch and touch ID is invalid\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
BadWindow
A value for a grab_window argument does not name a defined
Window\&.
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.sp
.if n \{\
.RS 4
.\}
.nf
XIGrabButton(libmansuffix)
.fi
.if n \{\
.RE
.\}
|