Normally mouse events are delivered as soon
as they occur to the appropriate window and client, as
determined by the window event masks and the input focus.
The routines described in this section allow the user to grab the mouse.
When a grab is in effect, events are sent to
the grabbing client, rather than to the normal client who would
have received the event. If the keyboard or pointer is put in
asynchronous mode, further mouse and keyboard events will continue
to be processed. If the keyboard or pointer is put in synchronous mode,
no further events will be processed until the grabbing client
allows them (see
There are two kinds of grabs: active and passive. An active grab occurs when a single client grabs the pointer explicitly. Clients can also grab a particular pointer button in a window, this is called a passive grab and activates when the button is actually pressed.
Many of the operations take a Time argument, which can be
current_time (the X server current time) or an actual timestamp