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