XSetWMProtocols

Syntax

Status XSetWMProtocols(display, w, protocols, count)
      Display *display;
      Window w;
      Atom *protocols;
      int count;

Arguments

display Specifies the connection to the X server.
w Specifies the window.
protocols Specifies the list of protocols.
count Specifies the number of protocols in the list.

Description

The XSetWMProtocols() function replaces the WM_PROTOCOLS property on the specified window with the list of atoms specified by the protocols argument. If the property does not already exist, XSetWMProtocols() sets the WM_PROTOCOLS property on the specified window to the list of atoms specified by the protocols argument. The property is stored with a type of ATOM and a format of 32. If it cannot intern the WM_PROTOCOLS atom, XSetWMProtocols() returns a zero status. Otherwise, it returns a nonzero status.

XSetWMProtocols() can generate BadAlloc and BadWindow errors.

Diagnostics

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

See also

XAllocClassHint(), XAllocIconSize(), XAllocSizeHints(), XAllocWMHints(), XGetWMProtocols(), XSetCommand(), XSetTextProperty(), XSetTransientForHint(), XSetWMClientMachine(), XSetWMColormapWindows(), XSetWMIconName(), XSetWMName(), XSetWMProperties(), XStringListToTextProperty(), "Setting and Reading the WM_TRANSIENT_FOR Property".
Christophe Tronche, [email protected]