XSetTransientForHint(3)

okay so bestie, this is XSetTransientForHint(3) from the XLIB FUNCTIONS manual, and we’re doing a vibe check on a window’s WM_TRANSIENT_FOR property πŸ’–βœ¨ it’s giving β€œset it or read it,” and honestly? iconic.

πŸ’– 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, aka your link to the server bestie πŸ”Œ
  • 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. That’s the main character move, periodt πŸ’…

XSetTransientForHint can generate BadAlloc and BadWindow errors. Ngl, noted.

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. So nonzero = slay, zero = the plot twist said β€œno” 😭

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. Yes, that’s the whole sentence fr fr πŸŽ€

πŸ’€ DIAGNOSTICS πŸ’€

  • BadAlloc β€” The server failed to allocate the requested resource or server memory. Server memory said β€œnot today” πŸ˜­πŸ’€
  • BadWindow β€” A value for a Window argument does not name a defined Window. That window is not giving defined-window energy, bestie πŸ’€

🌈 SEE ALSO 🌈

XAllocClassHint(3), XAllocIconSize(3), XAllocSizeHints(3), XAllocWMHints(3), XSetCommand(3), XSetTextProperty(3), XSetWMClientMachine(3), XSetWMColormapWindows(3), XSetWMIconName(3), XSetWMName(3), XSetWMProperties(3), XSetWMProtocols(3), XStringListToTextProperty(3)

And the big one: Xlib - C Language X Interface πŸ‘‘πŸŒˆ


footer sign-off, bestie: X Version 11 · libX11 1.8.14 · XSetTransientForHint(3) 🫢✨

πŸ“¦ where this page comes from