XUnmapEvent(3)
π XUnmapEvent(3) β the XLIB FUNCTIONS girlies' guide to UnmapNotify
okay bestie, so this one lives in the XLIB FUNCTIONS section of the X Version 11 manuals, and it's literally just the whole tea on the UnmapNotify event structure. it's short, it's sweet, it's giving "small but mighty" β¨
πΈ NAME πΈ
XUnmapEvent β the UnmapNotify event structure, periodt. π
π STRUCTURES π
so the structure for UnmapNotify events contains β and yes, we're copying it exactly, no cap, don't @ me:
typedef struct {
int type; /* UnmapNotify */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window event;
Window window;
Bool from_configure;
} XUnmapEvent;
when you receive this event, the structure members are set as follows. ok so let's break it down field by field π«Ά
the type member is set to the event type constant name that uniquely identifies it. for example β and this is the glow-up example, iykyk β when the X server reports a GraphicsExpose event to a client application, it sends an XGraphicsExposeEvent structure with the type member set to GraphicsExpose. see how that works? the name matches the vibe. β
the display member is set to a pointer to the display the event was read on. simple as that, no notes. π
the send_event member is set to True if the event came from a SendEvent protocol request. that's it, that's the whole rule.
the serial member is set from the serial number reported in the protocol β but expanded from the 16-bit least-significant bits to a full 32-bit value. so it's the same number, just living its full 32-bit main character era. π₯
the window member is set to the window that is most useful to toolkit dispatchers. (hold that thought β she comes back later π)
the event member is set either to the unmapped window or to its parent, depending on whether StructureNotify or SubstructureNotify was selected. this is the window used by the X server to report the event. so like, it depends on what you asked for, bestie. π
the window member β yes, her again β is set to the window that was unmapped. π (both facts are true, that's just how she is.)
the from_configure member is set to True if the event was generated as a result of a resizing of the window's parent when the window itself had a win_gravity of UnmapGravity. that's the whole condition, don't skip a word of it β UnmapGravity, ok? π¦
ngl, if you're checkingfrom_configureyou probably want to be real careful about whichwin_gravitythe window was rocking. the manpage says exactly one thing and that thing isUnmapGravity. no extras, no guessing, that's the rule. π
π SEE ALSO π
the whole friend group, in the exact order the page gives them β every single one, no cuts:
XAnyEvent(3),XButtonEvent(3),XCreateWindowEvent(3)XCirculateEvent(3),XCirculateRequestEvent(3),XColormapEvent(3)XConfigureEvent(3),XConfigureRequestEvent(3),XCrossingEvent(3)XDestroyWindowEvent(3),XErrorEvent(3),XExposeEvent(3)XFocusChangeEvent(3),XGraphicsExposeEvent(3),XGravityEvent(3)XKeymapEvent(3),XMapEvent(3),XMapRequestEvent(3),XPropertyEvent(3)XReparentEvent(3),XResizeRequestEvent(3),XSelectionClearEvent(3)XSelectionEvent(3),XSelectionRequestEvent(3),XVisibilityEvent(3)
and also Xlib - C Language X Interface β the big book, the source material, the mothership. ππ
that's the whole page bestie, we ate and left absolutely no crumbs π
kisses from X Version 11, libX11 1.8.14, and yours truly β mwah πβ¨
π¦ 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