xcb_map_window(3)

πŸ“¦
version 1.17.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ xcb_map_window ✨

okay bestie, welcome to the xcb_map_window(3) page from the XCB Requests collection 🫢 this one's short and sweet and it's literally just "make the window appear," let's get into it πŸ’…


🌸 NAME 🌸

xcb_map_window β€” makes a window visible πŸ‘€βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <xcb/xproto.h>

πŸ’– Request function πŸ’–

xcb_void_cookie_t xcb_map_window(xcb_connection_t *conn,
       xcb_window_t window);

πŸŽ€ REQUEST ARGUMENTS πŸŽ€

  • conn β€” your XCB connection to X11, the whole lil' hotline to the server πŸ’«
  • window β€” the window you're making visible. the one getting its main character moment 🌟

πŸ‘‘ DESCRIPTION πŸ‘‘

So it maps the window you hand it. Mapping = making it visible, and that's true as long as its parent is visible too. simple as that 🧚

but wait, there's a plot twist πŸ‘€

This MapWindow request gets translated into a MapRequest if a window manager is running. And then the window manager is the one deciding whether to actually map your window or not. Rude? maybe. But if you wanna bypass that whole mechanism, set the override-redirect window attribute to true πŸ’…

If the window manager decides to map the window (or if literally no window manager is running at all), a MapNotify event gets generated ✨

If the window becomes viewable and no earlier contents for it are remembered, the X server tiles the window with its background. But if the window's background is undefined, then the existing screen contents are not altered, and the X server generates zero or more Expose events 😭

And if the window type is InputOutput, an Expose event will be generated when the window becomes visible. The normal response to an Expose event should be to repaint the window. that's the vibe, no cap 🎨


⭐ RETURN VALUE ⭐

Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop, so don't come crying to the return value, it's not carrying that info 🫠

If you want to handle errors directly with xcb_request_check instead, use xcb_map_window_checked. See xcb-requests(3) for details πŸ“–


πŸ’€ ERRORS πŸ’€

  • xcb_match_error_t β€” the specified window does not exist. it's giving ghosted πŸ‘» the window you're looking for is not there bestie

🌈 SEE ALSO 🌈

xcb-requests(3), xcb_expose_event_t(3), xcb_map_notify_event_t(3), xcb_unmap_window(3)


πŸ’œ AUTHOR πŸ’œ

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements 🫢


and that's the whole page, bestie πŸ’– this was X Version 11, libxcb 1.17.0, xcb_map_window(3) β€” slay, go map a window, you got this πŸ‘‘βœ¨