XErrorEvent(3)
π XErrorEvent(3) β like, the X error event struct, bestie
okay so this one lives in the XLIB FUNCTIONS family, and honestly? it's the β¨receiptβ¨ you get when X is like "girl, that request did NOT go through." π«Ά
β¨ NAME β¨
XErrorEvent β the X error event structure. yep, that's the whole vibe. it's a struct. it holds the tea about what went wrong. π
π STRUCTURES π
bestie. sit down. here's the whole thing, and i mean the whole thing, comments and all, no cap:
typedef struct {
int type;
Display *display; /* Display the event was read from */
XID resourceid; /* resource id */
unsigned long serial; /* serial number of failed request */
unsigned char error_code; /* error code of failed request */
unsigned char request_code; /* Major op-code of failed request */
unsigned char minor_code; /* Minor op-code of failed request */
} XErrorEvent;
like, that's it. that's the icon. π
when you receive this event, the structure members are set as follows β main character energy, every field doing its job:
typeβ it's there, it's the type field, we love her.displayβ the display the event was read from.resourceidβ the resource id, i.e. which thing was involved.serialβ the serial number of the failed request. more on her in a sec πerror_codeβ the error code of the failed request. this is the actual "what went wrong."request_codeβ the major op-code of the failed request.minor_codeβ the minor op-code of the failed request.
π¦ the serial member, explained π¦
okay so serial is literally the number of requests β starting from one β sent over the network connection since it was opened. not zero. one. we start at one in this house. π
and more specifically: it's the number that was the value of NextRequest immediately before the failing call was made. so like, the last number before everything went sideways. π
πΈ the request_code member, explained πΈ
request_code is a protocol request of the procedure that failed, as defined in X11/Xproto.h. that's it. that's the definition. go read the header, iykyk. πβ¨
π₯ SEE ALSO π₯
the whole friend group!! go say hi to literally everyone:
AllPlanes(3)XAnyEvent(3)XButtonEvent(3)XCreateWindowEvent(3)XCirculateEvent(3)XCirculateRequestEvent(3)XColormapEvent(3)XConfigureEvent(3)XConfigureRequestEvent(3)XCrossingEvent(3)XDestroyWindowEvent(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)XUnmapEvent(3)XVisibilityEvent(3)
plus the big one: Xlib - C Language X Interface β the mothership, the blueprint, the blueprintiest blueprint. π
ngl this page is short but it ATE. tiny struct, huge lore. π
okay bye bestie, love u!! this page came to you courtesy of X Version 11 and libX11 1.8.14 β go forth and debug, you absolute icon π§ππ
π¦ 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