XSetWindowBackground() XSetWindowBackground()
Name
XSetWindowBackground - set the background pixel value attribute of a window.
Synopsis
XSetWindowBackground(display, w, background_pixel)
Display *display;
Window w;
unsigned long background_pixel;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
w Specifies the window ID. Must be an InputOutput window.
background_pixel
Specifies which entry in the colormap is used as the background color. The constant CopyFromParent is NOT valid.
Description
XSetWindowBackground() sets the background attribute of a window, setting the pixel value to be used to fill the background. This over-
rides any previous call to XSetWindowBackground or XSetWindowBackgroundPixmap() on the same window.
XSetWindowBackground() does not change the current window contents immediately. The background is automatically repainted after Expose
events. You can also redraw the background without Expose events by calling XClearWindow() immediately after.
For more information, see Volume One, Chapter 4, Window Attributes.
Errors
BadMatch Setting background of InputOnly window.
BadWindow
See Also
XChangeWindowAttributes(), XGetGeometry(), XGetWindowAttributes(), XSetWindowBackgroundPixmap(), XSetWindowBorder(), XSetWindowBorder-
Pixmap().
Xlib - Window Attributes XSetWindowBackground()