client is forced to block or busy-wait if expecting an event. Xlib does not send requests to the server immediately, but stores them in a queue, called the output buffer; the requests in the output buffer are actually sent when: the program explicitly requests so by calling a library function such as XFlush; the program calls a function that gives as a result something that involve a reply from the server, such as XGetWindowAttributes; the program asks for an event in the event queue (for example, by calling XNextEvent) and the call blocks (for example, XNextEvent blocks if the queue is empty.) Higher-level libraries such as Xt (which is in turn used by Xaw and Motif) allow the client program to specify the callback functions associated with some events; the library takes care of polling the event queue and calling the appropriate function when required; some events such as those indicating the need of redrawing a window are handled internally by Xt. Lower-level libraries, such as XCB, provide asynchronous access to the protocol, allowing better latency hiding. Unspecified parts The X Window System core protocol does not mandate over inter-client communication and does not specify how windows are used to form the visual elements that are common in graphical user interfaces (buttons, menus, etc.). Graphical user interface elements are defined by client libraries realizing widget toolkits. Inter-client communication is covered by other standards such as the ICCCM and freedesktop specifications. Inter-client communication is relevant to selections, cut buffers, and drag-and-drop, which are the methods used by a user to transfer data from a window to another. Since the windows may be controlled by different programs, a protocol for exchanging this data is necessary. Inter-client communication is also relevant to X window managers, which are programs that control the appearance of the windows and the general look-and-feel of the graphical user interface. Session management Yet another issue where inter-client communication is to some extent relevant is that of session management. How a user session starts is another issue that is not covered by the core protocol. Usually, this is done automatically by the X display manager. The user can however also start a session manually running the xinit or startx programs. See also X Window System protocols and architecture Xlib Intrinsics Xnee can be used to sniff the X Window System protocol References External links X.Org Foundation (official home page) -