1
XIGRABDEVICE(libmansuffix)
2
==========================
7
XIGrabDevice, XIUngrabDevice - grab or ungrab the device.
12
#include <X11/extensions/XInput2.h>
14
Status XIGrabDevice( Display *display,
20
int paired_device_mode,
24
Status XIUngrabDevice( Display *display,
29
Specifies the cursor image to display for the duration
33
Specifies the connection to the X server.
36
Specifies the device that should be grabbed or
39
grab_mode, paired_device_mode
40
The grab mode for this device and (if applicable) the
50
True if events are to be reported normally.
53
A valid timestamp or CurrentTime.
58
XIGrabDevice actively grabs control of the device. Further
59
device events are reported only to the grabbing client.
60
XIGrabDevice overrides any active device grab by this client.
62
If the device is an attached slave device, the device is
63
automatically detached from the master device and reattached to
64
the same master device when client ungrabs the device. If the
65
master device is removed while the device is floating as a
66
result of a grab, the device remains floating once the grab
69
If owner_events is False, all generated device events are
70
reported with respect to grab_window if selected. If
71
owner_events is True and if a generated device event would
72
normally be reported to this client, it is reported normally;
73
otherwise, the event is reported with respect to the
74
grab_window, and is only reported if specified in the event
77
If the grab_mode argument is GrabModeAsync, device event
78
processing continues as usual. If the device is currently
79
frozen by this client, then processing of device events is
80
resumed. If the grab_mode argument is GrabModeSync, the state
81
of the device (as seen by client applications) appears to
82
freeze, and the X server generates no further device events
83
until the grabbing client issues a releasing XIAllowEvents call
84
or until the device grab is released. Actual device changes are
85
not lost while the device is frozen; they are simply queued in
86
the server for later processing.
88
If paired_device_mode is GrabModeAsync, processing of events
89
from the paired master device is unaffected by activation of
90
the grab. If paired_device_mode is GrabModeSync, the state of
91
the paired master device (as seen by client applications)
92
appears to freeze, and the X server generates no further events
93
from this device until the grabbing client issues a releasing
94
XIAllowEvents call or until the device grab is released. Actual
95
events are not lost while the devices are frozen; they are
96
simply queued in the server for later processing. If the device
97
is a slave device paired_device_mode is ignored.
99
If the device is actively grabbed by some other client,
100
XIGrabDevice fails and returns AlreadyGrabbed. If grab_window
101
is not viewable, it fails and returns GrabNotViewable. If the
102
device is frozen by an active grab of another client, it fails
103
and returns GrabFrozen. If the specified time is earlier than
104
the last-device-grab time or later than the current X server
105
time, it fails and returns GrabInvalidTime. Otherwise, the
106
last-device-grab time is set to the specified time. CurrentTime
107
is replaced by the current X server time.
109
If cursor is not None this cursor is displayed until the client
110
calls XIUngrabDevice.
112
XIGrabDevice can generate BadDevice, BadValue, and BadWindow
115
The XIUngrabDevice request releases the device and any queued
116
events if this client has it actively grabbed from either
117
XIGrabDevice or XIGrabKey or XIGrabButton. If other devices are
118
frozen by the grab, XUngrabDevice thaws them. XUngrabDevice
119
does not release the device and any queued events if the
120
specified time is earlier than the last-device-grab time or is
121
later than the current X server time. The X server
122
automatically performs an XIUngrabDevice request if the event
123
window for an active device grab becomes not viewable.
125
XIUngrabDevice can generate a BadDevice error.
131
A value is outside of the permitted range.
134
An invalid device was specified. The device does not
135
exist or is not a appropriate for the type of change.
138
The window is not viewable.
141
A value for a Window argument does not name a defined
146
XIAllowEvents(libmansuffix)