/**
* Generic XI2 event. All XI2 events have the same header.
*/
typedef struct {
int type; /* GenericEvent */
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 */
int extension; /* XI extension offset */
int evtype;
Time time;
} XIEvent;
cool, makes sense, shared event header… okay let’s look at the events…
typedef struct {
int type; /* GenericEvent */
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 */
int extension; /* XI extension offset */
int evtype; /* XI_DeviceChanged */
Time time;
int deviceid; /* id of the device that changed */
int sourceid; /* Source for the new classes. */
int reason; /* Reason for the change */
int num_classes;
XIAnyClassInfo **classes; /* same as in XIDeviceInfo */
} XIDeviceChangedEvent;
no no no no no not like that, why is XIEvent not embedded there?? the fuck
i bet the implementation of those event functions is a cast-fest and strict aliasing nightmare
