Scroll to navigation

XSetWMProperties(3) XLIB FUNCTIONS XSetWMProperties(3)

NAME

XSetWMProperties, XmbSetWMProperties, Xutf8SetWMProperties - set standard window properties

SYNTAX

void XSetWMProperties(Display *display, Window w, XTextProperty *window_name, XTextProperty *icon_name, char **argv, int argc, XSizeHints *normal_hints, XWMHints *wm_hints, XClassHint *class_hints);

void XmbSetWMProperties(Display *display, Window w, _Xconst char *window_name, _Xconst char *icon_name, char *argv[], int argc, XSizeHints *normal_hints, XWMHints *wm_hints, XClassHint *class_hints);

void Xutf8SetWMProperties(Display *display, Window w, _Xconst char *window_name, _Xconst char *icon_name, char *argv[], int argc, XSizeHints *normal_hints, XWMHints *wm_hints, XClassHint *class_hints);

ARGUMENTS

Specifies the number of arguments.
Specifies the application's argument list.
Specifies theXClassHintstructure to be used.
Specifies the connection to the X server.
Specifies the icon name,which should be a null-terminated string.
Specifies the size hints for the window in its normal state.
Specifies the window.
Specifies the window name,which should be a null-terminated string.
Specifies theXWMHintsstructure to be used.

DESCRIPTION

TheXSetWMPropertiesconvenience function provides a single programming interfacefor setting those essential window properties that are usedfor communicating with other clients (particularly window and sessionmanagers).

If the window_name argument is non-NULL,XSetWMPropertiescallsXSetWMName,which in turn, sets the WM_NAME property (see section 14.1.4).If the icon_name argument is non-NULL,XSetWMPropertiescallsXSetWMIconName,which sets the WM_ICON_NAME property (see section 14.1.5).If the argv argument is non-NULL,XSetWMPropertiescallsXSetCommand,which sets the WM_COMMAND property (see section 14.2.1).Note that an argc of zero is allowed to indicate a zero-length command.Note also that the hostname of this machine is stored usingXSetWMClientMachine(see section 14.2.2).

If the normal_hints argument is non-NULL,XSetWMPropertiescallsXSetWMNormalHints,which sets the WM_NORMAL_HINTS property (see section 14.1.7).If the wm_hints argument is non-NULL,XSetWMPropertiescallsXSetWMHints,which sets the WM_HINTS property (see section 14.1.6).

If the class_hints argument is non-NULL,XSetWMPropertiescallsXSetClassHint,which sets the WM_CLASS property (see section 14.1.8).If the res_name member in theXClassHintstructure is set to the NULL pointer and the RESOURCE_NAME environmentvariable is set,then the value of the environment variable is substituted for res_name.If the res_name member is NULL,the environment variable is not set,and argv and argv[0] are set,then the value of argv[0], stripped ofany directory prefixes, is substituted for res_name.

TheXmbSetWMPropertiesandXutf8SetWMPropertiesconvenience functions provide a simple programming interfacefor setting those essential window properties that are usedfor communicating with other clients(particularly window and session managers).

If the window_name argument is non-NULL,they set the WM_NAME property.If the icon_name argument is non-NULL,they set the WM_ICON_NAME property.The window_name and icon_name arguments are null-terminated strings, forXmbSetWMPropertiesin the encoding of the current locale, forXutf8SetWMPropertiesin UTF-8 encoding.If the arguments can be fully converted to the STRING encoding,the properties are created with type “STRING”;otherwise, the arguments are converted to Compound Text,and the properties are created with type “COMPOUND_TEXT”.

If the normal_hints argument is non-NULL,XmbSetWMPropertiesandXutf8SetWMPropertiescallXSetWMNormalHints,which sets the WM_NORMAL_HINTS property (see section 14.1.7).If the wm_hints argument is non-NULL,XmbSetWMPropertiesandXutf8SetWMPropertiescallXSetWMHints,which sets the WM_HINTS property (see section 14.1.6).

If the argv argument is non-NULL,XmbSetWMPropertiesandXutf8SetWMPropertiesset the WM_COMMAND property from argv and argc.An argc of zero indicates a zero-length command.

The hostname of the machine is stored usingXSetWMClientMachine(see section 14.2.2).

If the class_hints argument is non-NULL,XmbSetWMPropertiesandXutf8SetWMPropertiesset the WM_CLASS property.If the res_name member in theXClassHintstructure is set to the NULL pointer and the RESOURCE_NAMEenvironment variable is set,the value of the environment variable is substituted for res_name.If the res_name member is NULL,the environment variable is not set, and argv and argv[0] are set,then the value of argv[0], stripped of any directory prefixes,is substituted for res_name.

It is assumed that the supplied class_hints.res_name and argv,the RESOURCE_NAME environment variable, and the hostname of the machineare in the encoding of the current locale.The corresponding WM_CLASS, WM_COMMAND, and WM_CLIENT_MACHINE propertiesare typed according to the local host locale announcer.No encoding conversion is performed for these strings prior to storagein the properties.

For clients that need to process the property text in a locale,XmbSetWMPropertiesandXutf8SetWMPropertiesset the WM_LOCALE_NAME property to be the name of the current locale.The name is assumed to be in the Host Portable Character Encodingand is converted to STRING for storage in the property.

XSetWMProperties,XmbSetWMPropertiesandXutf8SetWMPropertiescan generateBadAllocandBadWindowerrors.

The functionXutf8SetWMPropertiesis an extension introduced by The XFree86 Project, Inc., in their 4.0.2release.Its presence isindicated by the macroX_HAVE_UTF8_STRING.

PROPERTIES

Set by application programs to allow window and sessionmanagers to obtain the application's resources from the resource database.
The string name of the machine on which the client application is running.
The command and arguments, null-separated, used to invoke theapplication.
Additional hints set by the client for use by the window manager.The C type of this property isXWMHints.
The name to be used in an icon.
The name of the application.
Size hints for a window in its normal state.The C type of this property isXSizeHints.

DIAGNOSTICS

The server failed to allocate the requested resource or server memory.
A value for a Window argument does not name a defined Window.

SEE ALSO

XAllocClassHint(3),XAllocIconSize(3),XAllocSizeHints(3),XAllocWMHints(3),XParseGeometry(3),XSetCommand(3),XSetTransientForHint(3),XSetTextProperty(3),XSetWMClientMachine(3),XSetWMColormapWindows(3),XSetWMIconName(3),XSetWMName(3),XSetWMProtocols(3),XStringListToTextProperty(3),XTextListToTextProperty(3)
Xlib - C Language X Interface

libX11 1.8.12 X Version 11