XCloseDisplay

Syntax

XCloseDisplay(display)
      Display *display;

Arguments

display Specifies the connection to the X server.

Description

The XCloseDisplay() function closes the connection to the X server for the display specified in the Display structure and destroys all windows, resource IDs (Window, Font, Pixmap, Colormap, Cursor, and GContext), or other resources that the client has created on this display, unless the close-down mode of the resource has been changed (see XSetCloseDownMode()). Therefore, these windows, resource IDs, and other resources should never be referenced again or an error will be generated. Before exiting, you should call XCloseDisplay() explicitly so that any pending errors are reported as XCloseDisplay() performs a final XSync() operation.

Diagnostics

XCloseDisplay() can generate a BadGC error.

See also

XFlush(), XSetCloseDownMode(), The Xlib Programming manual: "Closing the Display"
Christophe Tronche, [email protected]