xcb_reparent_window(3)
π xcb_reparent_window β the "hey bestie, go live with a new parent now" request π
okay so this is a page from the XCB Requests manual, section 3, and the function is xcb_reparent_window. grab a snack, we're moving windows around. π¦
β¨ SYNOPSIS β¨
#include <xcb/xproto.h>
π Request function π
xcb_void_cookie_t xcb_reparent_window(xcb_connection_t *conn,
xcb_window_t window, xcb_window_t parent, int16_t x, int16_t y);
πΈ REQUEST ARGUMENTS πΈ
connβ the XCB connection to X11. your link to the whole vibe, literally.windowβ the window we're reparenting. the main character getting a new home. πparentβ the new parent of the window. the new fam it's moving in with.xβ the X position of the window within its new parent.yβ the Y position of the window within its new parent.
π DESCRIPTION π
so what it does: it makes the specified window a child of the specified parent window. that's the whole thing. glow-up via new parent, no cap.
and here's the cute part β if the window is mapped, it will automatically be unmapped before reparenting and re-mapped after reparenting. it doesn't even need you to do anything, it just handles itself. iconic behaviour honestly. π
the window is placed in the stacking order on top with respect to sibling windows. so it shows up above its new siblings. periodt.
after reparenting, a ReparentNotify event is generated. β¨
π₯ RETURN VALUE π₯
returns an xcb_void_cookie_t. ngl bestie, errors (if any) have to be handled in the event loop β they do not come back to you right here.
if you want to handle errors directly with xcb_request_check instead, use xcb_reparent_window_checked. see xcb-requests(3) for details.
π ERRORS π
xcb_match_error_tβ this one's got a whole list of ways to get it wrong, pay attention:- the new parent window is not on the same screen as the old parent window.
- the new parent window is the specified window or an inferior of the specified window.
- the new parent is
InputOnlyand the window is not. - the specified window has a
ParentRelativebackground and the new parent window is not the same depth as the specified window.
xcb_window_error_tβ the specified window does not exist. gone. ghosted. π
fr fr, check the xcb_match_error_t conditions before you send this, because there are four separate ways to trip it and they're all in that one error.
π SEE ALSO π
π«Ά AUTHOR π«Ά
generated from xproto.xml. contact xcb@lists.freedesktop.org for corrections and improvements. they're nice, they want your feedback, slay.
and that's the whole page, bestie! π this was X Version 11, libxcb 1.17.0, and it's page xcb_reparent_window(3) β go forth and reparent responsibly. mwah. πβ¨
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms