1XSetWMProperties(3) XLIB FUNCTIONS XSetWMProperties(3)
2
3
4
6 XSetWMProperties, XmbSetWMProperties, Xutf8SetWMProperties - set stan‐
7 dard window properties
8
10 void XSetWMProperties(Display *display, Window w, XTextProperty *win‐
11 dow_name, XTextProperty *icon_name, char **argv, int argc,
12 XSizeHints *normal_hints, XWMHints *wm_hints, XClassHint
13 *class_hints);
14
15 void XmbSetWMProperties(Display *display, Window w, _Xconst char *win‐
16 dow_name, _Xconst char *icon_name, char *argv[], int argc,
17 XSizeHints *normal_hints, XWMHints *wm_hints, XClassHint
18 *class_hints);
19
20 void Xutf8SetWMProperties(Display *display, Window w, _Xconst char
21 *window_name, _Xconst char *icon_name, char *argv[], int argc,
22 XSizeHints *normal_hints, XWMHints *wm_hints, XClassHint
23 *class_hints);
24
26 argc Specifies the number of arguments.
27
28 argv Specifies the application's argument list.
29
30 class_hints
31 Specifies the XClassHint structure to be used.
32
33 display Specifies the connection to the X server.
34
35 icon_name Specifies the icon name, which should be a null-terminated
36 string.
37
38 normal_hints
39 Specifies the size hints for the window in its normal state.
40
41 w Specifies the window.
42
43 window_name
44 Specifies the window name, which should be a null-terminated
45 string.
46
47 wm_hints Specifies the XWMHints structure to be used.
48
50 The XSetWMProperties convenience function provides a single programming
51 interface for setting those essential window properties that are used
52 for communicating with other clients (particularly window and session
53 managers).
54
55 If the window_name argument is non-NULL, XSetWMProperties calls XSetWM‐
56 Name, which in turn, sets the WM_NAME property (see section 14.1.4).
57 If the icon_name argument is non-NULL, XSetWMProperties calls XSetWMI‐
58 conName, which sets the WM_ICON_NAME property (see section 14.1.5). If
59 the argv argument is non-NULL, XSetWMProperties calls XSetCommand,
60 which sets the WM_COMMAND property (see section 14.2.1). Note that an
61 argc of zero is allowed to indicate a zero-length command. Note also
62 that the hostname of this machine is stored using XSetWMClientMachine
63 (see section 14.2.2).
64
65 If the normal_hints argument is non-NULL, XSetWMProperties calls
66 XSetWMNormalHints, which sets the WM_NORMAL_HINTS property (see section
67 14.1.7). If the wm_hints argument is non-NULL, XSetWMProperties calls
68 XSetWMHints, which sets the WM_HINTS property (see section 14.1.6).
69
70 If the class_hints argument is non-NULL, XSetWMProperties calls XSet‐
71 ClassHint, which sets the WM_CLASS property (see section 14.1.8). If
72 the res_name member in the XClassHint structure is set to the NULL
73 pointer and the RESOURCE_NAME environment variable is set, then the
74 value of the environment variable is substituted for res_name. If the
75 res_name member is NULL, the environment variable is not set, and argv
76 and argv[0] are set, then the value of argv[0], stripped of any direc‐
77 tory prefixes, is substituted for res_name.
78
79 The XmbSetWMProperties and Xutf8SetWMProperties convenience functions
80 provide a simple programming interface for setting those essential win‐
81 dow properties that are used for communicating with other clients (par‐
82 ticularly window and session managers).
83
84 If the window_name argument is non-NULL, they set the WM_NAME property.
85 If the icon_name argument is non-NULL, they set the WM_ICON_NAME prop‐
86 erty. The window_name and icon_name arguments are null-terminated
87 strings, for XmbSetWMProperties in the encoding of the current locale,
88 for Xutf8SetWMProperties in UTF-8 encoding. If the arguments can be
89 fully converted to the STRING encoding, the properties are created with
90 type “STRING”; otherwise, the arguments are converted to Compound Text,
91 and the properties are created with type “COMPOUND_TEXT”.
92
93 If the normal_hints argument is non-NULL, XmbSetWMProperties and
94 Xutf8SetWMProperties call XSetWMNormalHints, which sets the WM_NOR‐
95 MAL_HINTS property (see section 14.1.7). If the wm_hints argument is
96 non-NULL, XmbSetWMProperties and Xutf8SetWMProperties call XSetWMHints,
97 which sets the WM_HINTS property (see section 14.1.6).
98
99 If the argv argument is non-NULL, XmbSetWMProperties and Xutf8SetWM‐
100 Properties set the WM_COMMAND property from argv and argc. An argc of
101 zero indicates a zero-length command.
102
103 The hostname of the machine is stored using XSetWMClientMachine (see
104 section 14.2.2).
105
106 If the class_hints argument is non-NULL, XmbSetWMProperties and
107 Xutf8SetWMProperties set the WM_CLASS property. If the res_name member
108 in the XClassHint structure is set to the NULL pointer and the
109 RESOURCE_NAME environment variable is set, the value of the environment
110 variable is substituted for res_name. If the res_name member is NULL,
111 the environment variable is not set, and argv and argv[0] are set, then
112 the value of argv[0], stripped of any directory prefixes, is substi‐
113 tuted for res_name.
114
115 It is assumed that the supplied class_hints.res_name and argv, the
116 RESOURCE_NAME environment variable, and the hostname of the machine are
117 in the encoding of the current locale. The corresponding WM_CLASS,
118 WM_COMMAND, and WM_CLIENT_MACHINE properties are typed according to the
119 local host locale announcer. No encoding conversion is performed for
120 these strings prior to storage in the properties.
121
122 For clients that need to process the property text in a locale, Xmb‐
123 SetWMProperties and Xutf8SetWMProperties set the WM_LOCALE_NAME prop‐
124 erty to be the name of the current locale. The name is assumed to be
125 in the Host Portable Character Encoding and is converted to STRING for
126 storage in the property.
127
128 XSetWMProperties, XmbSetWMProperties and Xutf8SetWMProperties can gen‐
129 erate BadAlloc and BadWindow errors.
130
131 The function Xutf8SetWMProperties is an extension introduced by The
132 XFree86 Project, Inc., in their 4.0.2 release. Its presence is indi‐
133 cated by the macro X_HAVE_UTF8_STRING.
134
136 WM_CLASS Set by application programs to allow window and session man‐
137 agers to obtain the application's resources from the resource
138 database.
139
140 WM_CLIENT_MACHINE
141 The string name of the machine on which the client applica‐
142 tion is running.
143
144 WM_COMMAND
145 The command and arguments, null-separated, used to invoke the
146 application.
147
148 WM_HINTS Additional hints set by the client for use by the window man‐
149 ager. The C type of this property is XWMHints.
150
151 WM_ICON_NAME
152 The name to be used in an icon.
153
154 WM_NAME The name of the application.
155
156 WM_NORMAL_HINTS
157 Size hints for a window in its normal state. The C type of
158 this property is XSizeHints.
159
161 BadAlloc The server failed to allocate the requested resource or
162 server memory.
163
164 BadWindow A value for a Window argument does not name a defined Window.
165
167 XAllocClassHint(3), XAllocIconSize(3), XAllocSizeHints(3), XAl‐
168 locWMHints(3), XParseGeometry(3), XSetCommand(3), XSetTransient‐
169 ForHint(3), XSetTextProperty(3), XSetWMClientMachine(3), XSetWMCol‐
170 ormapWindows(3), XSetWMIconName(3), XSetWMName(3), XSetWMProtocols(3),
171 XStringListToTextProperty(3), XTextListToTextProperty(3)
172 Xlib - C Language X Interface
173
174
175
176X Version 11 libX11 1.6.12 XSetWMProperties(3)