---
name: "XSetTransientForHint"
section: "3x"
platform: "linux"
package: "libx11-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/XSetTransientForHint/3x"
---

# XSetTransientForHint(3x)

set or read a window's WM\_TRANSIENT\_FOR property

## NAME

XSetTransientForHint, XGetTransientForHint - set or read a window's WM\_TRANSIENT\_FOR property

## SYNTAX

int XSetTransientForHint(Display \**display*, Window *w*, Window *prop\_window*);

Status XGetTransientForHint(Display \**display*, Window *w*, Window \**prop\_window\_return*);

## ARGUMENTS

- *display*

  Specifies the connection to the X server.

- *w*

  Specifies the window.

- *prop\_window*

  Specifies the window that the WM\_TRANSIENT\_FOR property is to be set to.

- *prop\_window\_return*

  Returns the WM\_TRANSIENT\_FOR property of the specified window.

## DESCRIPTION

The *XSetTransientForHint* function sets the WM\_TRANSIENT\_FOR property of the specified window to the  specified prop\_window.

*XSetTransientForHint* can generate *BadAlloc* and *BadWindow* errors.

The *XGetTransientForHint* function returns the WM\_TRANSIENT\_FOR property for the specified window. It returns a nonzero status on success; otherwise, it returns a zero status.

*XGetTransientForHint* can generate a *BadWindow* error.

## PROPERTIES

- WM\_TRANSIENT\_FOR

  Set by application programs to indicate to the window manager that a transient top-level window, such as a dialog box.

## DIAGNOSTICS

- *BadAlloc*

  The server failed to allocate the requested resource or server memory.

- *BadWindow*

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

## SEE ALSO

XAllocClassHint(3X11), XAllocIconSize(3X11), XAllocSizeHints(3X11), XAllocWMHints(3X11), XSetCommand(3X11), XSetTextProperty(3X11), XSetWMClientMachine(3X11), XSetWMColormapWindows(3X11), XSetWMIconName(3X11), XSetWMName(3X11), XSetWMProperties(3X11), XSetWMProtocols(3X11), XStringListToTextProperty(3X11)\
 *Xlib - C Language X Interface*
