Next: , Previous: , Up: Top   [Contents][Index]


13 Events and Input

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.

Device Events

Keyboard

:key-press :key-release

Pointer

:button-press :button-release :enter-notify :leave-notify :motion-notify

Side-Effect Events

Client communication

:client-message :property-notify :selection-clear :selection-notify :selection-request

Color map state

:colormap-notify

Exposure

:exposure :graphics-exposure :no-exposure

Input focus

:focus-in :focus-out

Keyboard and pointer state

:keymap-notify :mapping-notify

Structure control

:circulate-request :configure-request :map-request

Window state

: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.


Next: , Previous: , Up: Top   [Contents][Index]