XReparentEvent(3)
π XReparentEvent(3) π
okay bestie, welcome to the XLIB FUNCTIONS zone β this page is all about XReparentEvent, the ReparentNotify event structure. No cap, it's giving βwindow got a new parentβ energy, and we're gonna read the whole struct together. π«Ά
π NAME π
XReparentEvent β ReparentNotify event structure. That's the whole name, periodt. β¨
π§ STRUCTURES π§
The structure for ReparentNotify events contains:
typedef struct {
int type; /* ReparentNotify */
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;
Window parent;
int x, y;
Bool override_redirect;
} XReparentEvent;
When you receive this event, the structure members are set as follows. π
First the general event bookkeeping, so you know what's what:
typeβ set to the event type constant name that uniquely identifies it. Example time: when the X server reports aGraphicsExposeevent to a client application, it sends anXGraphicsExposeEventstructure with thetypemember set toGraphicsExpose. Iconic.displayβ set to a pointer to the display the event was read on. That's your display bestie. π₯οΈsend_eventβ set toTrueif the event came from aSendEventprotocol request. Not me checking where it came from, but yes. πserialβ set from the serial number reported in the protocol, but expanded from the 16-bit least-significant bits to a full 32-bit value. Math-ish, but make it make sense. π’windowβ set to the window that is most useful to toolkit dispatchers. (More specificwindowtea below, don't worry.) πͺ
Then the reparent-specific members do their thing:
eventβ set either to the reparented window or to the old or the new parent, depending on whetherStructureNotifyorSubstructureNotifywas selected. Pick your notifier, get yourevent. πwindowβ set to the window that was reparented. That's the main character of this event, fr fr. πparentβ set to the new parent window. New parent just dropped. πx,yβ set to the reparented window's coordinates relative to the new parent window's origin, and they define the upper-left outer corner of the reparented window. Coordinates, but make it cute. πoverride_redirectβ set to the override-redirect attribute of the window specified by thewindowmember.
π¨ window manager clients: normally you should ignore this window if theoverride_redirectmember isTrue. That's the rule, bestie. Don't fight it. π
π SEE ALSO π
All the sibling event pages and the big Xlib reference, in all their glory:
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)XResizeRequestEvent(3)XSelectionClearEvent(3)XSelectionEvent(3)XSelectionRequestEvent(3)XUnmapEvent(3)XVisibilityEvent(3)Xlib - C Language X Interface
mwah π okay that's the page. The footer sign-off is X Version 11, libX11 1.8.14, on page XReparentEvent(3) β and there's no separate date line in the footer, so that's the whole source/version vibe. π«Άβ¨
π¦ 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