XResizeRequestEvent(3)
π XResizeRequestEvent β the ResizeRequest event struct, explained
okay so bestie, this is a page from XLIB FUNCTIONS (the Xlib girlies, you know the ones) and it's all about XResizeRequestEvent β literally the ResizeRequest event structure. that's the whole name section, we move π«Ά
β¨ NAME β¨
XResizeRequestEvent β ResizeRequest event structure. that's it, that's the name, iconic behaviour π
π STRUCTURES π
the structure for ResizeRequest events contains this, and yes you're gonna want to copy it exactly:
typedef struct {
int type; /* ResizeRequest */
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 window;
int width, height;
} XResizeRequestEvent;
so when you receive this event (and you will), the structure members are set as follows, no cap:
typeβ this one gets set to the event type constant name that uniquely identifies it. fr fr. example time: when the X server reports aGraphicsExposeevent to a client application, it sends anXGraphicsExposeEventstructure with thetypemember set toGraphicsExpose. see the pattern? slay.displayβ set to a pointer to the display the event was read on.send_eventβ set toTrueif the event came from aSendEventprotocol request.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. glow-up energy honestly β¨windowβ set to the window that is most useful to toolkit dispatchers.
and then there's a second thing about window, because it's a main character with layers π:
window is set to the window whose size another client attempted to change. and the width and height members are set to the inside size of the window, excluding the border. so the border is not invited to this party, ok? π
lowkey important: the width/height are the inside size. border not included. don't come for me if you forget and your layout is off by a couple pixels π
π SEE ALSO π
the whole friend group, all of them, iykyk:
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), XSelectionClearEvent(3), XSelectionEvent(3), XSelectionRequestEvent(3), XUnmapEvent(3), XVisibilityEvent(3)
and of course the big one, the mothership: Xlib - C Language X Interface π
and that's the page babes π¦ this was X Version 11, libX11 1.8.14, dated XResizeRequestEvent(3) β go forth and handle your resize requests responsibly, 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