Next Prev Up

2.4 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 paragraph 12.3, 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.


display-after-function display Function
     
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.

display-force-output display Function
     
display
A display object.

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


display-finish-output display Function
     
display
A display object.

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


Next Prev Up
© 1988, 1989 Texas Instruments Incorporated
Conversion to HTML made by Gilbert Baumann.
Last build: Tue Dec 16 23:30:42 1997