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


3.3 Managing the Output Buffer

Most CLX functions cause output requests to be generated to an X server. Output requests are not transmitted immediately but instead are stored in an output buffer for the appropriate display. Requests in the output buffer are typically sent only when the buffer is filled. Alternatively, buffered requests can be sent prior to processing an event in the input event queue (see Processing Events). In either case, CLX sends the output buffer automatically without explicit instructions from the client application.

However, in some cases, explicit control over the output buffer is needed, typically to ensure that the X server is in a consistent state before proceeding further. The display-force-output and display-finish-output functions allow a client program to synchronize with buffered output requests.

Function: display-after-function display
display

A display object.

Returns and (with setf) sets the after-function for the given display. If after-function is non-nil, it is a function that is called after every protocol request is generated, even those inside an explicit with-display, but never called from inside the after-function. The function is called inside the effective with-display for the associated request. The default value is nil. This can be set, for example, to #’display-force-output or #’ display-finish-output.

after-function

Type function or null.

Function: display-force-output display
display

A display object.

Forces any buffered output to be sent to the X server.

Function: display-finish-output display
display

A display object.

Forces any buffered output to be sent to the X server and then waits until all requests display error handler. Any events generated by output requests are read and stored in the event queue.


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