XCloseDisplay() XCloseDisplay()
Name
XCloseDisplay - disconnect a client program from an X server and display.
Synopsis
XCloseDisplay(display)
Display *display;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
Description
XCloseDisplay() closes the connection between the current client and the X server specified by the Display argument.
The XCloseDisplay() routine destroys all windows, resource IDs (Window, Font, Pixmap, Colormap, Cursor, and GContext), or other resources
(GCs) that the client application has created on this display, unless the close down mode of the client's resources has been changed by
XSetCloseDownMode(). Therefore, these windows, resource IDs, and other resources should not be referenced again. In addition, this rou-
tine discards any requests that have been buffered but not yet sent to the server.
Although these operations automatically (implicitly) occur when a process exits under UNIX, you should call XCloseDisplay() anyway so that
any pending errors are reported as XCloseDisplay() performs a final XSync() operation.
For more information, see Volume One, Chapter 3, Basic Window Program.
Errors
BadGC Default GC already freed.
See Also
XDefaultScreen(), XFree(), XNoOp(), XOpenDisplay().
Xlib - HouseKeeping XCloseDisplay()