XCloseDisplay()XCloseDisplay()NameXCloseDisplay – disconnect a client program from an X server and dis‐
play.
SynopsisXCloseDisplay(display)
Display *display;
Arguments
display Specifies a connection to an X server; returned from
XOpenDisplay().
DescriptionXCloseDisplay() 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 XSet‐
CloseDownMode(). Therefore, these windows, resource IDs, and other
resources should not be referenced again. In addition, this routine
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 AlsoXDefaultScreen(), XFree(), XNoOp(), XOpenDisplay().
Xlib - HouseKeeping XCloseDisplay()