A client application uses CLX functions to send requests to an X server over a display connection returned by the open-display function. In return, the X server sends back replies and events. Replies are synchronized with specific requests and return requested server information. Events typically occur asynchronously. Device events are generated by user input from both the keyboard and pointer devices. Other events are side-effects of the requests sent by CLX functions. The types of events returned by an X server are summarized below.
:button-press :button-release :enter-notify :leave-notify :motion-notify
:client-message :property-notify :selection-clear :selection-notify :selection-request
:exposure :graphics-exposure :no-exposure
:circulate-request :configure-request :map-request
:resize-request :circulate-notify :configure-notify :create-notify :destroy-notify :gravity-notify :map-notify :reparent-notify :unmap-notify :visibility-notify
Client programs can override the server’s normal distribution of events by grabbing the pointer or the keyboard. Grabbing causes events from the pointer or keyboard device to be reported to a single specified window, rather than to their ordinary destinations. It can also cause the server to freeze the grabbed device, sending queued events only when explicitly requested by the grabbing client. Two kinds of grabs are possible:
Grabbing an input device is performed rarely and usually only by special clients, such as window managers.
This section describes the CLX functions used to:
This section also contains a detailed description of the content of each type of event.
|• Selecting Events:|
|• Processing Events:|
|• Managing the Event Queue:|
|• Sending Events:|
|• Pointer Position:|
|• Managing Input Focus:|
|• Grabbing the Pointer:|
|• Grabbing a Button:|
|• Grabbing the Keyboard:|
|• Grabbing a Key:|
|• Event Types:|
|• Releasing Queued Events:|