Status XFetchName(display, w, window_name_return)
      Display *display;
      Window w;
      char **window_name_return;


display Specifies the connection to the X server.
w Specifies the window.
window_name_return Returns the window name, which is a null-terminated string.


The XFetchName() function returns the name of the specified window. If it succeeds, it returns a nonzero status; otherwise, no name has been set for the window, and it returns zero. If the WM_NAME property has not been set for this window, XFetchName() sets window_name_return to NULL. If the data returned by the server is in the Latin Portable Character Encoding, then the returned string is in the Host Portable Character Encoding. Otherwise, the result is implementation dependent. When finished with it, a client must free the window name string using XFree().

XFetchName() can generate a BadWindow error.


BadWindow A value for a Window argument does not name a defined Window.

See also

XAllocClassHint(), XAllocIconSize(), XAllocSizeHints(), XAllocWMHints(), XFree(), XGetWMName(), XSetCommand(), XSetTextProperty(), XSetTransientForHint(), XSetWMClientMachine(), XSetWMColormapWindows(), XSetWMColormapWindows(), XSetWMIconName(), XSetWMIconName(), XSetWMName(), XSetWMProperties(), XSetWMProtocols(), XStoreName(), XStringListToTextProperty(), "Setting and Reading Text Properties".
Christophe Tronche, [email protected]