xcb_configure_window(3)
β¨ xcb_configure_window(3) β¨
okay bestie, welcome to the XCB Requests section of the manual, and today's main character is xcb_configure_window π
π NAME π
xcb_configure_window β configures window attributes β¨
πΈ SYNOPSIS πΈ
#include <xcb/xproto.h>
π Request function π
xcb_void_cookie_t xcb_configure_window(xcb_connection_t *conn,
xcb_window_t window, uint16_t value_mask, const
void *value_list);
π¦ REQUEST ARGUMENTS π¦
connβ the XCB connection to X11. your lil hotline to the X server, periodt πwindowβ the window you're about to configure. the one getting the glow-up πvalue_maskβ a bitmask of the attributes you wanna change. it's giving "which levers am I pulling today" ποΈvalue_listβ the new values, and they correspond to the attributes invalue_mask. the order HAS to correspond to the order of possiblevalue_maskbits β do not freestyle this, bestie π see the example below, fr fr.
π DESCRIPTION π
Configures a window's size, position, border width and stacking order. that's it, that's the whole vibe β¨
π RETURN VALUE π
Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop β so like, you don't get them handed to you right away, you gotta go pick them up at the function's house later π«Ά
If you want to handle errors directly with xcb_request_check instead, use xcb_configure_window_checked. See xcb-requests(3) for details π
π₯ ERRORS π₯
xcb_match_error_tβ you specified aSiblingwithout also specifyingStackMode, or the window is not actually aSibling. awkward πxcb_value_error_tβTODO: reasons?(yes the manpage literally says that, iconic honestly)xcb_window_error_tβ the specified window does not exist.TODO: any other reason?(again, straight from the source, no cap)
β EXAMPLE β
/*
* Configures the given window to the left upper corner
* with a size of 1024x768 pixels.
*
*/
void my_example(xcb_connection_t *c, xcb_window_t window) {
uint16_t mask = 0;
mask |= XCB_CONFIG_WINDOW_X;
mask |= XCB_CONFIG_WINDOW_Y;
mask |= XCB_CONFIG_WINDOW_WIDTH;
mask |= XCB_CONFIG_WINDOW_HEIGHT;
const uint32_t values[] = {
0, /* x */
0, /* y */
1024, /* width */
768 /* height */
};
xcb_configure_window(c, window, mask, values);
xcb_flush(c);
}
see how the values[] array lines up with the order of the mask bits? that's the whole assignment, bestie β mask order = value order, always π
π SEE ALSO π
xcb-requests(3), xcb-examples(3), xcb_expose_event_t(3), xcb_map_notify_event_t(3)
π«Ά AUTHOR π«Ά
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. go off, xml π
cute lil sign-off: this page came from X Version 11, libxcb 1.17.0, and it's living in the xcb_configure_window(3) slot of your manual. slay, stay configured β¨ππ¦
π¦ 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