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

NAME

6       XSetWMName, XGetWMName, XStoreName, XFetchName - set or read a window's
7       WM_NAME property
8

SYNTAX

10       void XSetWMName(Display *display, Window w, XTextProperty *text_prop);
11
12       Status XGetWMName(Display *display, Window w, XTextProperty
13              *text_prop_return);
14
15       int XStoreName(Display *display, Window w, char *window_name);
16
17       Status XFetchName(Display *display, Window w, char **win‐
18              dow_name_return);
19

ARGUMENTS

21       display   Specifies the connection to the X server.
22
23       text_prop Specifies the XTextProperty structure to be used.
24
25       text_prop_return
26                 Returns the XTextProperty structure.
27
28       w         Specifies the window.
29
30       window_name
31                 Specifies the window name, which should be a null-terminated
32                 string.
33
34       window_name_return
35                 Returns the window name, which is a null-terminated string.
36

DESCRIPTION

38       The XSetWMName convenience function calls XSetTextProperty to set the
39       WM_NAME property.
40
41       The XGetWMName convenience function calls XGetTextProperty to obtain
42       the WM_NAME property.  It returns a nonzero status on success; other‐
43       wise, it returns a zero status.
44
45       The XStoreName function assigns the name passed to window_name to the
46       specified window.  A window manager can display the window name in some
47       prominent place, such as the title bar, to allow users to identify win‐
48       dows easily.  Some window managers may display a window's name in the
49       window's icon, although they are encouraged to use the window's icon
50       name if one is provided by the application.  If the string is not in
51       the Host Portable Character Encoding, the result is implementation-
52       dependent.
53
54       XStoreName can generate BadAlloc and BadWindow errors.
55
56       The XFetchName function returns the name of the specified window.  If
57       it succeeds, it returns a nonzero status; otherwise, no name has been
58       set for the window, and it returns zero.  If the WM_NAME property has
59       not been set for this window, XFetchName sets window_name_return to
60       NULL.  If the data returned by the server is in the Latin Portable
61       Character Encoding, then the returned string is in the Host Portable
62       Character Encoding.  Otherwise, the result is implementation-dependent.
63       When finished with it, a client must free the window name string using
64       XFree.
65
66       XFetchName can generate a BadWindow error.
67

PROPERTIES

69       WM_NAME   The name of the application.
70

DIAGNOSTICS

72       BadAlloc  The server failed to allocate the requested resource or
73                 server memory.
74
75       BadWindow A value for a Window argument does not name a defined Window.
76

SEE ALSO

78       XAllocClassHint(3), XAllocIconSize(3), XAllocSizeHints(3), XAl‐
79       locWMHints(3), XFree(3), XSetCommand(3), XSetTransientForHint(3), XSet‐
80       TextProperty(3), XSetWMClientMachine(3), XSetWMColormapWindows(3),
81       XSetWMIconName(3), XSetWMProperties(3), XSetWMProtocols(3),
82       XStringListToTextProperty(3)
83       Xlib - C Language X Interface
84
85
86
87X Version 11                     libX11 1.3.4                    XSetWMName(3)
Impressum