XMapWindow(3)
Hey bestie π welcome to XMapWindow(3), straight outta XLIB FUNCTIONS β¨ This page is all about mapping windows, and itβs genuinely giving main-character energy π«Ά
πΈ NAME πΈ
XMapWindow, XMapRaised, XMapSubwindows β map windows π
β¨ SYNTAX β¨
int XMapWindow(Display *display, Window w);
int XMapRaised(Display *display, Window w);
int XMapSubwindows(Display *display, Window w);
π ARGUMENTS π
displayβ specifies the connection to the X server πwβ specifies the window πͺ
π¦ DESCRIPTION π¦
Okay so XMapWindow maps the window and all of its subwindows that have had map requests. Mapping a window that has an unmapped ancestor does not display the window, but it marks it as eligible for display when the ancestor becomes mapped. A window in that situation is called unviewable π When all its ancestors are mapped, the window becomes viewable and will be visible on the screen if it is not obscured by another window. This function has no effect if the window is already mapped. Periodt π
If the override-redirect of the window is False and if some other client has selected SubstructureRedirectMask on the parent window, then the X server generates a MapRequest event, and the XMapWindow function does not map the window. Otherwise, the window is mapped, and the X server generates a MapNotify event π
If the window becomes viewable and no earlier contents for it are remembered, the X server tiles the window with its background. If the windowβs background is undefined, the existing screen contents are not altered, and the X server generates zero or more Expose events. If backing-store was maintained while the window was unmapped, no Expose events are generated. If backing-store will now be maintained, a full-window exposure is always generated. Otherwise, only visible regions may be reported. Similar tiling and exposure take place for any newly viewable inferiors π
If the window is an InputOutput window, XMapWindow generates Expose events on each InputOutput window that it causes to be displayed. If the client maps and paints the window and if the client begins processing events, the window is painted twice π To avoid this, first ask for Expose events and then map the window, so the client processes input events as usual. The event list will include Expose for each window that has appeared on the screen. The clientβs normal response to an Expose event should be to repaint the window. This method usually leads to simpler programs and to proper interaction with window managers π«Ά
XMapWindow can generate a BadWindow error π
The XMapRaised function essentially is similar to XMapWindow in that it maps the window and all of its subwindows that have had map requests. However, it also raises the specified window to the top of the stack π XMapRaised can generate a BadWindow error.
The XMapSubwindows function maps all subwindows for a specified window in top-to-bottom stacking order. The X server generates Expose events on each newly displayed window. This may be much more efficient than mapping many windows one at a time because the server needs to perform much of the work only once, for all of the windows, rather than for each window. XMapSubwindows can generate a BadWindow error β‘
π DIAGNOSTICS π
BadWindowβ a value for aWindowargument does not name a definedWindowπ
π₯ SEE ALSO π₯
XChangeWindowAttributes(3)XConfigureWindow(3)XCreateWindow(3)XDestroyWindow(3)XRaiseWindow(3)XUnmapWindow(3)Xlib - C Language X Interface
And thatβs the vibe check, bestie π This iconic lilβ page comes from X Version 11, libX11 1.8.14, and it signs off as XMapWindow(3) β no cap, slay, bye πβ¨
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms