diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-20 17:02:50 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-22 15:44:56 +1000 |
commit | 438a4eafa5d14ab676827f7a5d58782c02db4cdf (patch) | |
tree | f2b7e4aaa8922cb5fb2467d0dd89cfa37be1b0b2 /include | |
parent | b12d302df8283186ce87882c29b2b0294adb2770 (diff) |
input: remove nested union from InternalEvent.
There's no need for internal events to be a struct with a single nested
union, we might as well make the union itself the InternalEvent.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/events.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/events.h b/include/events.h index 871932049..ab8f2176a 100644 --- a/include/events.h +++ b/include/events.h @@ -63,9 +63,9 @@ enum { ET_Internal = 0xFF /* First byte */ } EventType; -#define CHECKEVENT(ev) if (ev && ((InternalEvent*)(ev))->u.any.header != 0xFF) \ +#define CHECKEVENT(ev) if (ev && ((InternalEvent*)(ev))->any.header != 0xFF) \ FatalError("Wrong event type %d.\n", \ - ((InternalEvent*)(ev))->u.any.header); + ((InternalEvent*)(ev))->any.header); /** * Used for ALL input device events internal in the server until @@ -204,9 +204,7 @@ typedef struct * Event type used inside the X server for input event * processing. */ -typedef struct -{ - union { +typedef union { struct { unsigned char header; /**< Always ET_Internal */ int type; /**< One of ET_* */ @@ -219,7 +217,6 @@ typedef struct DGAEvent dga; #endif RawDeviceEvent raw; - } u; } InternalEvent; #endif |