XCirculateEvent(3)

hiii bestie πŸ’– welcome to XCirculateEvent(3), straight outta the XLIB FUNCTIONS shelf. this is the CirculateNotify event structure and she's lowkey iconic.

🌸 NAME 🌸

XCirculateEvent β€” the CirculateNotify event structure. that's the whole name, no cap.

πŸ¦‹ STRUCTURES πŸ¦‹

the structure for CirculateNotify events contains:

       typedef struct {
               int type;       /* CirculateNotify */
               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;
               int place;      /* PlaceOnTop, PlaceOnBottom */
       } XCirculateEvent;

when you receive this event, the structure members are set as follows. yes, every single one β€” grab a snack πŸ“

  • type β€” set to the event type constant name that uniquely identifies it. for example, when the X server reports a GraphicsExpose event to a client application, it sends an XGraphicsExposeEvent structure with the type member set to GraphicsExpose. iykyk.
  • display β€” set to a pointer to the display the event was read on. pointer main character energy.
  • send_event β€” set to True if the event came from a SendEvent protocol 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. the glow-up is real.
  • window β€” set to the window that is most useful to toolkit dispatchers.

okay and now the circulate-specific tea πŸ«–: the event member is set either to the restacked window or to its parent, depending on whether StructureNotify or SubstructureNotify was selected. the window member is set to the window that was restacked. the place member is set to the window's position after the restack occurs, and it's either PlaceOnTop or PlaceOnBottom. if it's PlaceOnTop, the window is now on top of all siblings. if it's PlaceOnBottom, the window is now below all siblings. sibling hierarchy drama, but make it protocol ✨.

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, bestie β€” they're all part of the Xlib event-structure cinematic universe:

mwah πŸ’‹ β€” source/version check: X Version 11, libX11 1.8.14, page XCirculateEvent(3). that's the footer, and we're out πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from