1XALLOWDEVICEEVENTS(3) XALLOWDEVICEEVENTS(3)
2
3
4
6 XAllowDeviceEvents - release queued events
7
9 #include <X11/extensions/XInput.h>
10
11 int XAllowDeviceEvents( Display *display,
12 XDevice *device,
13 int event_mode,
14 Time time);
15 display
16 Specifies the connection to the X server.
17
18 device
19 Specifies the device from which events are to be
20 allowed.
21
22 event_mode
23 Specifies the event mode.You can pass AsyncThisDevice,
24 SyncThisDevice, ReplayThisDevice, AsyncOtherDevices,
25 SyncAll,or AsyncAll.
26
27 time
28 Specifies the time.You can pass either a timestamp or
29 CurrentTime.
30
32 The XAllowDeviceEvents function releases some queued events if the
33 client has caused a device to freeze. It has no effect if the specified
34 time is earlier than the last-grab time of the most recent active grab
35 for the client and device, or if the specified time is later than the
36 current X server time.
37
38 The following describes the processing that occurs depending on what
39 constant you pass to the event_mode argument.
40
41 · AsyncThisDevice - If the specified device is frozen by the client,
42 event processing for that device continues as usual. If the device
43 is frozen multiple times by the client on behalf of multiple
44 separate grabs, AsyncThisDevice thaws for all.AsyncThisDevice has
45 no effect if the specified device is not frozen by the client, but
46 the device need not be grabbed by the client.
47
48 · SyncThisDevice - If the specified device is frozen and actively
49 grabbed by the client, event processing for that device continues
50 normally until the next key or button event is reported to the
51 client. At this time, the specified device again appears to freeze.
52 However, if the reported event causes the grab to be released, the
53 specified device does not freeze. SyncThisDevice has no effect if
54 the specified device is not frozen by the client or is not grabbed
55 by the client.
56
57 · ReplayThisDevice - If the specified device is actively grabbed by
58 the client and is frozen as the result of an event having been sent
59 to the client (either from the activation of a GrabDeviceButton or
60 from a previous AllowDeviceEvents with mode SyncThisDevice, but not
61 from a GrabDevice), the grab is released and that event is
62 completely reprocessed. This time, however, the request ignores any
63 passive grabs at or above (toward the root) that the grab-window of
64 the grab just released. The request has no effect if the specified
65 device is not grabbed by the client or if it is not frozen as the
66 result of an event.
67
68 · AsyncOtherDevices - If the remaining devices are frozen by the
69 client, event processing for them continues as usual. If the other
70 devices are frozen multiple times by the client on behalf of
71 multiple grabs, AsyncOtherDevices "thaws" for all.
72 AsyncOtherDevices has no effect if the devices are not frozen by
73 the client.
74
75 · SyncAll - If all devices are frozen by the client, event processing
76 (for all devices) continues normally until the next button or key
77 event is reported to the client for a grabbed device, at which time
78 all devices again appear to freeze. However, if the reported event
79 causes the grab to be released, then the devices do not freeze. If
80 any device is still grabbed, then a subsequent event for it will
81 still cause all devices to freeze. SyncAll has no effect unless all
82 devices are frozen by the client. If any device is frozen twice by
83 the client on behalf of two separate grabs, SyncAll thaws for both.
84 A subsequent freeze for SyncAll will only freeze each device once.
85
86 · AsyncAll - If all devices are frozen by the client, event
87 processing for all devices continues normally. If any device is
88 frozen multiple times by the client on behalf of multiple separate
89 grabs, AsyncAll thaws for all. AsyncAll has no effect unless all
90 devices are frozen by the client.
91
92 AsyncThisDevice, SyncThisDevice, and ReplayThisDevice have no effect on
93 the processing of events from the remaining devices.AsyncOtherDevices
94 has no effect on the processing of events from the specified device.
95 When the event_mode is SyncAll or AsyncAll, the device parameter is
96 ignored.
97
98 It is possible for several grabs of different devices by the same or
99 different clients to be active simultaneously. If a device is frozen on
100 behalf of any grab, no event processing is performed for the device. It
101 is possible for a single device to be frozen because of several grabs.
102 In this case, the freeze must be released on behalf of each grab before
103 events can again be processed.
104
105 XAllowDeviceEvents can generate a BadDevice or BadValue error.
106
108 BadDevice
109 An invalid device was specified. The specified device
110 does not exist or has not been opened by this client via
111 XOpenInputDevice. This error may also occur if the
112 specified device is the X keyboard or X pointer device.
113
114 BadValue
115 An invalid mode was specified on the request.
116
118 XGrabDevice(3)
119
120
121
122 03/09/2013 XALLOWDEVICEEVENTS(3)