1XChangeWindowAttributes(3)      XLIB FUNCTIONS      XChangeWindowAttributes(3)
2
3
4

NAME

6       XChangeWindowAttributes, XSetWindowBackground, XSetWindowBackground‐
7       Pixmap, XSetWindowBorder, XSetWindowBorderPixmap, XSetWindowColormap -
8       change window attributes
9

SYNTAX

11       int XChangeWindowAttributes(Display *display, Window w, unsigned long
12              valuemask, XSetWindowAttributes *attributes);
13
14       int XSetWindowBackground(Display *display, Window w, unsigned long
15              background_pixel);
16
17       int XSetWindowBackgroundPixmap(Display *display, Window w, Pixmap back‐
18              ground_pixmap);
19
20       int XSetWindowBorder(Display *display, Window w, unsigned long bor‐
21              der_pixel);
22
23       int XSetWindowBorderPixmap(Display *display, Window w, Pixmap bor‐
24              der_pixmap);
25
26       int XSetWindowColormap(Display *display, Window w, Colormap colormap);
27

ARGUMENTS

29       attributes
30                 Specifies the structure from which the values (as specified
31                 by the value mask) are to be taken.  The value mask should
32                 have the appropriate bits set to indicate which attributes
33                 have been set in the structure.
34
35       background_pixel
36                 Specifies the pixel that is to be used for the background.
37
38       background_pixmap
39                 Specifies the background pixmap, ParentRelative, or None.
40
41       border_pixel
42                 Specifies the entry in the colormap.
43
44       border_pixmap
45                 Specifies the border pixmap or CopyFromParent.
46
47       display   Specifies the connection to the X server.
48
49       valuemask Specifies which window attributes are defined in the
50                 attributes argument.  This mask is the bitwise inclusive OR
51                 of the valid attribute mask bits.  If valuemask is zero, the
52                 attributes are ignored and are not referenced.
53
54       w         Specifies the window.
55
56       colormap  Specifies the colormap.
57

DESCRIPTION

59       Depending on the valuemask, the XChangeWindowAttributes function uses
60       the window attributes in the XSetWindowAttributes structure to change
61       the specified window attributes.  Changing the background does not
62       cause the window contents to be changed.  To repaint the window and its
63       background, use XClearWindow.  Setting the border or changing the back‐
64       ground such that the border tile origin changes causes the border to be
65       repainted.  Changing the background of a root window to None or Paren‐
66       tRelative restores the default background pixmap.  Changing the border
67       of a root window to CopyFromParent restores the default border pixmap.
68       Changing the win-gravity does not affect the current position of the
69       window.  Changing the backing-store of an obscured window to WhenMapped
70       or Always, or changing the backing-planes, backing-pixel, or save-under
71       of a mapped window may have no immediate effect.  Changing the colormap
72       of a window (that is, defining a new map, not changing the contents of
73       the existing map) generates a ColormapNotify event.  Changing the col‐
74       ormap of a visible window may have no immediate effect on the screen
75       because the map may not be installed (see XInstallColormap).  Changing
76       the cursor of a root window to None restores the default cursor.  When‐
77       ever possible, you are encouraged to share colormaps.
78
79       Multiple clients can select input on the same window.  Their event
80       masks are maintained separately.  When an event is generated, it is
81       reported to all interested clients.  However, only one client at a time
82       can select for SubstructureRedirectMask, ResizeRedirectMask, and But‐
83       tonPressMask.  If a client attempts to select any of these event masks
84       and some other client has already selected one, a BadAccess error
85       results.  There is only one do-not-propagate-mask for a window, not one
86       per client.
87
88       XChangeWindowAttributes can generate BadAccess, BadColor, BadCursor,
89       BadMatch, BadPixmap, BadValue, and BadWindow errors.
90
91       The XSetWindowBackground function sets the background of the window to
92       the specified pixel value.  Changing the background does not cause the
93       window contents to be changed.  XSetWindowBackground uses a pixmap of
94       undefined size filled with the pixel value you passed.  If you try to
95       change the background of an InputOnly window, a BadMatch error results.
96
97       XSetWindowBackground can generate BadMatch and BadWindow errors.
98
99       The XSetWindowBackgroundPixmap function sets the background pixmap of
100       the window to the specified pixmap.  The background pixmap can immedi‐
101       ately be freed if no further explicit references to it are to be made.
102       If ParentRelative is specified, the background pixmap of the window's
103       parent is used, or on the root window, the default background is
104       restored.  If you try to change the background of an InputOnly window,
105       a BadMatch error results.  If the background is set to None, the window
106       has no defined background.
107
108       XSetWindowBackgroundPixmap can generate BadMatch, BadPixmap, and Bad‐
109       Window errors.
110
111       The XSetWindowBorder function sets the border of the window to the
112       pixel value you specify.  If you attempt to perform this on an Inpu‐
113       tOnly window, a BadMatch error results.
114
115       XSetWindowBorder can generate BadMatch and BadWindow errors.
116
117       The XSetWindowBorderPixmap function sets the border pixmap of the win‐
118       dow to the pixmap you specify.  The border pixmap can be freed immedi‐
119       ately if no further explicit references to it are to be made.  If you
120       specify CopyFromParent, a copy of the parent window's border pixmap is
121       used.  If you attempt to perform this on an InputOnly window, a Bad‐
122       Match error results.
123
124       XSetWindowBorderPixmap can generate BadMatch, BadPixmap, and BadWindow
125       errors.
126
127       The XSetWindowColormap function sets the specified colormap of the
128       specified window.  The colormap must have the same visual type as the
129       window, or a BadMatch error results.
130
131       XSetWindowColormap can generate BadColor, BadMatch, and BadWindow
132       errors.
133

DIAGNOSTICS

135       BadAccess A client attempted to free a color map entry that it did not
136                 already allocate.
137
138       BadAccess A client attempted to store into a read-only color map entry.
139
140       BadColor  A value for a Colormap argument does not name a defined Col‐
141                 ormap.
142
143       BadCursor A value for a Cursor argument does not name a defined Cursor.
144
145       BadMatch  Some argument or pair of arguments has the correct type and
146                 range but fails to match in some other way required by the
147                 request.
148
149       BadMatch  An InputOnly window locks this attribute.
150
151       BadPixmap A value for a Pixmap argument does not name a defined Pixmap.
152
153       BadValue  Some numeric value falls outside the range of values accepted
154                 by the request.  Unless a specific range is specified for an
155                 argument, the full range defined by the argument's type is
156                 accepted.  Any argument defined as a set of alternatives can
157                 generate this error.
158
159       BadWindow A value for a Window argument does not name a defined Window.
160

SEE ALSO

162       XConfigureWindow(3), XCreateWindow(3), XDestroyWindow(3), XInstallCol‐
163       ormap(3), XMapWindow(3), XRaiseWindow(3), XUnmapWindow(3)
164       Xlib - C Language X Interface
165
166
167
168X Version 11                     libX11 1.6.7       XChangeWindowAttributes(3)
Impressum