XSetWMHints()XSetWMHints()NameXSetWMHints – set a window manager hints property.
Synopsis
XSetWMHints(display, w, wmhints)
Display *display;
Window w;
XWMHints *wmhints;
Arguments
display Specifies a connection to an X server; returned from XOpenDis‐
play().
w Specifies the ID for which window manager hints are to be set.
wmhints Specifies a pointer to the window manager hints.
DescriptionXSetWMHints() sets the window manager hints that include icon informa‐
tion and location, the initial state of the window, and whether the
application relies on the window manager to get keyboard input.
This function is unnecessary in Release 4 and later if you call XSetWM‐
Properties().
See Volume One, Chapter 12, Interclient Communication, for a descrip‐
tion of each XWMHints structure member.
Structures
typedef struct {
long flags; /* marks defined fields in structure */
Bool input; /* does application need window manager for
* keyboard input */
int initial_state; /* see below */
Pixmap icon_pixmap; /* pixmap to be used as icon */
Window icon_window; /* window to be used as icon */
int icon_x, icon_y; /* initial position of icon */
Pixmap icon_mask; /* icon mask bitmap */
XID window_group; /* ID of related window group */
/* this structure may be extended in the future */
} XWMHints;
/* definitions for the flags field: */
#define InputHint (1L << 0)
#define StateHint (1L << 1)
#define IconPixmapHint (1L << 2)
#define IconWindowHint (1L << 3)
#define IconPositionHint (1L << 4)
#define IconMaskHint (1L << 5)
#define WindowGroupHint (1L << 6)
#define AllHints (InputHint StateHint IconPixmapHint IconWindowHint \
IconPositionHint IconMaskHint WindowGroupHint)
/* definitions for the initial state flag: */
#define WithdrawnState 0 /* application would like to be unmapped */
#define NormalState 1 /* most applications want to start this way */
#define IconicState 3 /* application wants to start as an icon */
Errors
BadAlloc
BadWindow
See AlsoXAllocWMHints(), XFetchName(), XGetClassHint(), XGetIconName(), XGetI‐
conSizes(), XGetNormalHints(), XGetSizeHints(), XGetTransientForHint(),
XGetWMHints(), XGetZoomHints(), XSetClassHint(), XSetCommand(). XSetI‐
conName(), XSetIconSizes(), XSetNormalHints(), XSetSizeHints(), XSet‐
TransientForHint(), XSetZoomHints(), XStoreName(), XSetWMProperties().
Xlib - Window Manager Hints XSetWMHints()