1
XIGRABBUTTON(libmansuffix)
2
==========================
7
XIGrabButton, XIUngrabButton, XIGrabKeycode, XIUngrabKeycode -
8
grab/ungrab buttons or keys
13
#include <X11/extensions/XInput.h>
15
int XIGrabButton( Display *display,
21
int paired_device_mode,
25
XIGrabModifiers *modifiers_inout);
27
int XIUngrabButton( Display *display,
32
XIGrabModifiers *modifiers);
34
int XIGrabKeycode( Display *display,
39
int paired_device_mode,
43
XIGrabModifiers *modifiers_inout);
45
int XIUngrabKeycode( Display *display,
50
XIGrabModifiers *modifiers);
53
Specifies the connection to the X server.
56
Specifies the device that is to be grabbed or released
59
Specifies the device button that is to be grabbed or
60
released or XIAnyButton.
63
Specifies the keycode that is to be grabbed or released
67
Number of elements in modifiers or modifiers_return
70
Specifies the set of latched and base modifiers or
71
XIAnyModifier to ungrab. The data type is for
72
consistency with the respective grab request and the
73
status code of the XIGrabModifiers struct is ignored.
76
Specifies the set of latched and base modifiers or
77
XIAnyModifier to grab. Returns the modifiers that could
78
not be grabbed and their status code.
81
Specifies the grab window.
84
Specifies a Boolean value that indicates whether the are
85
to be reported as usual or reported with respect to the
89
Specifies the event mask.
92
Specifies further processing of events from this device.
93
You can pass GrabModeSync or GrabModeAsync.
96
Specifies further processing of events from the paired
97
master device. You can pass GrabModeSync or
98
GrabModeAsync. If deviceid specifies a floating slave
99
device, this parameter is ignored.
104
XIGrabButton and XIGrabKeycode establishes a passive grab. The
105
modifier device for a button grab is the paired master device
106
if deviceid specifies a master pointer. Otherwise, the modifier
107
device is the device specified with deviceid. In the future,
108
the device is actively grabbed (as for XIGrabDevice, the
109
last-grab time is set to the time at which the button or keycode
110
was pressed and the X_XIButtonPress or X_XIKeyPress event is
111
reported if all of the following conditions are true:
112
* The device is not grabbed, and the specified button or
113
keycode is logically pressed when the specified modifier
114
keys are logically down on the modifier device and no other
115
buttons or modifier keys are logically down.
116
* Either the grab window is an ancestor of (or is) the focus
117
window, OR the grab window is a descendent of the focus
118
window and contains the device.
119
* A passive grab on the same button/modifier combination does
120
not exist on any ancestor of grab_window.
122
The interpretation of the remaining arguments is as for
123
XIGrabDevice. The active grab is terminated automatically when
124
the logical state of the device has all buttons or keys
125
released (independent of the logical state of the modifier
128
If the device is an attached slave device, the device is
129
automatically detached from the master device when the grab
130
activates and reattached to the same master device when the
131
grab deactivates. If the master device is removed while the
132
device is floating as a result of a grab, the device remains
133
floating once the grab deactivates.
135
Note that the logical state of a device (as seen by client
136
applications) may lag the physical state if device event
137
processing is frozen.
139
This request overrides all previous grabs by the same client on
140
the same button/modifier or keycode/modifier combinations on the
141
same window. A modifiers of XIAnyModifier is equivalent to
142
issuing the grab request for all possible modifier combinations
143
(including the combination of no modifiers). It is not required
144
that all modifiers specified have currently assigned KeyCodes.
145
A button of XIAnyButton is equivalent to issuing the request
146
for all possible buttons. Otherwise, it is not required that
147
the specified button currently be assigned to a physical
150
If some other client has already issued a XIGrabButton or
151
XIGrabKeycode with the same button/modifier or keycode/modifier
152
combination on the same window, a BadAccess error results. When
153
using XIAnyModifier or XIAnyButton , the request fails
154
completely, and a XIBadAccess error results (no grabs are
155
established) if there is a conflicting grab for any
156
combination. XIGrabButton and XIGrabKeycode have no effect on an
159
XIGrabButton and XIGrabKeycode can generate BadClass, BadDevice,
160
BadMatch, BadValue, and BadWindow errors.
162
XIUngrabButton and XIUngrabKeycode releases the passive grab for
163
a button/modifier or keycode/modifier combination on the
164
specified window if it was grabbed by this client. A modifier
165
of XIAnyModifier is equivalent to issuing the ungrab request
166
for all possible modifier combinations, including the
167
combination of no modifiers. A button of XIAnyButton is
168
equivalent to issuing the request for all possible buttons.
169
XIUngrabButton and XIUngrabKeycode have no effect on an active
172
XIUngrabButton and XIUngrabKeycode can generate BadDevice,
173
BadMatch, BadValue and BadWindow errors.
179
An invalid deviceid was specified.
182
This error may occur if XIGrabButton specified a device
183
that has no buttons, or XIGrabKeycode specified a device
187
Some numeric value falls outside the range of values
188
accepted by the request. Unless a specific range is
189
specified for an argument, the full range defined by the
190
argument's type is accepted. Any argument defined as a
191
set of alternatives can generate this error.
194
A value for a Window argument does not name a defined
200
XIAllowEvents(libmansuffix)