1XIGRABENTER(3)                                                  XIGRABENTER(3)
2
3
4

NAME

6       XIGrabEnter, XIUngrabEnter, XIGrabFocusIn, XIUngrabFocusIn -
7       grab/ungrab enter or focus in events.
8

SYNOPSIS

10       #include <X11/extensions/XInput.h>
11
12       int XIGrabEnter( Display *display,
13                        int deviceid,
14                        Window grab_window,
15                        Cursor cursor,
16                        int grab_mode,
17                        int paired_device_mode,
18                        Bool owner_events,
19                        XIEventMask *mask,
20                        int num_modifiers,
21                        XIGrabModifiers *modifiers_inout);
22
23       int XIUngrabEnter( Display *display,
24                          int deviceid,
25                          Window grab_window
26                          int num_modifiers,
27                          XIGrabModifiers *modifiers);
28
29       int XIGrabFocusIn ( Display *display,
30                           int deviceid,
31                           Window grab_window
32                           int grab_mode,
33                           int paired_device_mode,
34                           Bool owner_events,
35                           XIEventMask *mask,
36                           int num_modifiers,
37                           XIGrabModifiers *modifiers_inout);
38
39       int XIUngrabFocusIn( Display *display,
40                            int deviceid,
41                            Window grab_window
42                            int num_modifiers,
43                            XIGrabModifiers *modifiers);
44       display
45              Specifies the connection to the X server.
46
47       device
48              Specifies the device that is to be grabbed or released
49
50       num_modifiers
51              Number of elements in modifiers or modifiers_inout.
52
53       modifiers
54              Specifies the set of latched and base modifiers or
55              XIAnyModifier to ungrab. The data type is for
56              consistency with the respective grab request and the
57              status code of the XIGrabModifiers struct is ignored.
58
59       modifiers_inout
60              Specifies the set of latched and base modifiers or
61              XIAnyModifier to grab. Returns the modifiers that could
62              not be grabbed and their status code.
63
64       grab_window
65              Specifies the grab window.
66
67       owner_events
68              Specifies a Boolean value that indicates whether the are
69              to be reported as usual or reported with respect to the
70              grab window.
71
72       mask
73              Specifies the event mask.
74
75       grab_mode
76              Specifies further processing of events from this device.
77              You can pass XIGrabModeSync or XIGrabModeAsync.
78
79       paired_device_mode
80              Specifies further processing of events from the paired
81              master device. You can pass XIGrabModeSync or
82              XIGrabModeAsync. If deviceid specifies a floating slave
83              device, this parameter is ignored.
84

DESCRIPTION

86           XIGrabEnter and XIGrabFocusIn establish a passive grab. The
87           modifier device for a enter grab is the paired master device if
88           deviceid specifies a master pointer. Otherwise, the modifier
89           device is the device specified with deviceid.
90
91           For XIGrabEnter and XIGrabFocusIn, in the future, the device is
92           actively grabbed (as for XIGrabDevice, the last-grab time is
93           set to the time at which the pointer/focus entered window) if
94           the device is not grabbed and the pointer has entered the
95           grab_window or the focus has been set to the grab_window when
96           the specified modifier keys are logically down on the modifier
97           device and no other buttons or modifier keys are logically
98           down.
99
100           The interpretation of the remaining arguments is as for
101           XIGrabDevice. The active grab is terminated automatically when
102           the pointer leaves the window or the focus is set to a
103           different window (independent of the logical state of the
104           modifier keys).
105
106           If the device is an attached slave device, the device is
107           automatically detached from the master device when the grab
108           activates and reattached to the same master device when the
109           grab deactivates. If the master device is removed while the
110           device is floating as a result of a grab, the device remains
111           floating once the grab deactivates.
112
113           Note that the logical state of a device (as seen by client
114           applications) may lag the physical state if device event
115           processing is frozen.
116
117           This request overrides all previous grabs by the same client of
118           the same type and modifier combinations on the same window. A
119           modifiers of XIAnyModifier is equivalent to issuing the grab
120           request for all possible modifier combinations (including the
121           combination of no modifiers). It is not required that all
122           modifiers specified have currently assigned KeyCodes.
123
124           If some other client has already issued a XIGrabEnter or
125           XIGrabFocusIn  on the same window, a BadAccess error results.
126           When using XIAnyModifier, the request fails completely, and a
127           XIBadAccess error results (no grabs are established) if there
128           is a conflicting grab for any combination. XIGrabEnter and
129           XIGrabFocusin have no effect on an active grab.
130
131           On success, XIGrabEnter and XIGrabFocusIn return 0;
132           If one or more modifier combinations could not be grabbed,
133           XIGrabEnter and XIGrabFocusIn return the number of failed
134           combinations and modifiers_inout contains the failed combinations
135           and their respective status codes.
136
137           XIGrabEnter and XIGrabFocusIn can generate BadDevice,
138           BadMatch, BadValue, and BadWindow errors.
139
140           XIUngrabEnter and XIUngrabFocusIn releases the passive grab on
141           the specified window if it was grabbed by this client. A
142           modifier of XIAnyModifier is equivalent to issuing the ungrab
143           request for all possible modifier combinations, including the
144           combination of no modifiers. XIUngrabEnter and XIUngrabFocusIn
145           have no effect on an active grab.
146
147           XIUngrabEnter and XIUngrabFocusIn can generate BadDevice,
148           BadMatch, BadValue and BadWindow errors.
149

RETURN VALUE

151           XIGrabEnter and XIGrabFocusIn return the number of modifier combination
152           that could not establish a passive grab. The modifiers are returned in
153           modifiers_inout, along with the respective error for this modifier
154           combination. If XIGrabEnter or XIGrabFocusIn return zero, passive grabs
155           with all requested modifier combinations were established successfully.
156

DIAGNOSTICS

158           BadDevice
159                  An invalid deviceid was specified.
160
161           BadMatch
162                  This error may occur if XIGrabEnter specified a device
163                  that has no valuators, or XIGrabFocusIn specified a device
164                  that has no keys.
165
166           BadValue
167                  Some numeric value falls outside the range of values
168                  accepted by the request. Unless a specific range is
169                  specified for an argument, the full range defined by the
170                  argument's type is accepted. Any argument defined as a
171                  set of alternatives can generate this error.
172
173           BadWindow
174                  A value for a Window argument does not name a defined
175                  Window.
176

BUGS

178           The protocol headers for XI 2.0 did not provide
179           XIGrabModeAsync or XIGrabModeSync. Use GrabModeSync and
180           GrabModeAsync instead, respectively.
181

SEE ALSO

183           XIAllowEvents(3)
184
185
186
187                                  06/19/2019                    XIGRABENTER(3)
Impressum