XSetWindowBackground

Syntax

XSetWindowBackground(display, w, background_pixel)
      Display *display;
      Window w;
      unsigned long background_pixel;

Arguments

display Specifies the connection to the X server.
w Specifies the window.
background_pixel Specifies the pixel that is to be used for the background.

Description

The XSetWindowBackground() function sets the background of the window to the specified pixel value. Changing the background does not cause the window contents to be changed. XSetWindowBackground() uses a pixmap of undefined size filled with the pixel value you passed. If you try to change the background of an InputOnly window, a BadMatch error results.

XSetWindowBackground() can generate BadMatch and BadWindow errors.

Note

XSetWindowBackground() and XSetWindowBackgroundPixmap() do not change the current contents of the window.

Diagnostics

BadMatch An InputOnly window is used as a Drawable.
BadMatch Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request.
BadWindow A value for a Window argument does not name a defined Window.

See also

XChangeWindowAttributes(), XConfigureWindow(), XCreateWindow(), XDestroyWindow(), XInstallColormap(), XMapWindow(), XRaiseWindow(), XSetWindowBackgroundPixmap(), XSetWindowBorder(), XSetWindowBorderPixmap(), XSetWindowColormap(), XUnmapWindow(), "Changing Window Attributes"
Christophe Tronche, [email protected]