12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFT• A passive grab on the same key combination does not exist on any ancestor of grab_window.The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminatedautomatically when the logical state of the keyboard has the specified key released (independentof the logical state of the modifier keys).Note that the logical state of a device (as seen by client applications) may lag the physical state ifdevice event processing is frozen.Amodifiers argument of AnyModifier is equivalent to issuing the request for all possible modifiercombinations (including the combination of no modifiers). It is not required that all modifiersspecified have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent toissuing the request for all possible KeyCodes. Otherwise, the specified keycode must be in therange specified by min_keycode and max_keycode in the connection setup, or a BadValue errorresults.If some other client has issued a XGrabKey with the same key combination on the same window,a BadAccess error results. When using AnyModifier or AnyKey, the request fails completely,and a BadAccess error results (no grabs are established) if there is a conflicting grab forany combination.XGrabKey can generate BadAccess, BadValue, and BadWindow errors.To ungrab a key, use XUngrabKey.XUngrabKey (display, keycode, modifiers, grab_window)Display *display;int keycode;unsigned int modifiers;Window grab_window;displaykeycodemodifiersgrab_windowSpecifies the connection to the X server.Specifies the KeyCode or AnyKey.Specifies the set of keymasks or AnyModifier. The mask is the bitwise inclusiveOR of the valid keymask bits.Specifies the grab window.The XUngrabKey function releases the key combination on the specified window ifitwasgrabbed by this client. It has no effect on an active grab. Amodifiers of AnyModifier is equivalentto issuing the request for all possible modifier combinations (including the combination ofno modifiers). Akeycode argument of AnyKey is equivalent to issuing the request for all possiblekey codes.XUngrabKey can generate BadValue and BadWindow errors.12.3. Resuming Event ProcessingThe previous sections discussed grab mechanisms with which processing of events by the servercan be temporarily suspended. This section describes the mechanism for resuming event processing.To allow further events to be processed when the device has been frozen, use XAllowEvents.256

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!