From 438a4eafa5d14ab676827f7a5d58782c02db4cdf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 20 May 2009 17:02:50 +1000 Subject: 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 --- dix/eventconvert.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'dix/eventconvert.c') diff --git a/dix/eventconvert.c b/dix/eventconvert.c index 97fc2add3..403282cb3 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -69,7 +69,7 @@ static int eventToRawEvent(RawDeviceEvent *ev, xEvent **xi); int EventToCore(InternalEvent *event, xEvent *core) { - switch(event->u.any.type) + switch(event->any.type) { case ET_Motion: case ET_ButtonPress: @@ -117,7 +117,7 @@ EventToCore(InternalEvent *event, xEvent *core) int EventToXI(InternalEvent *ev, xEvent **xi, int *count) { - switch (ev->u.any.type) + switch (ev->any.type) { case ET_Motion: case ET_ButtonPress: @@ -134,7 +134,7 @@ EventToXI(InternalEvent *ev, xEvent **xi, int *count) return Success; } - ErrorF("[dix] EventToXI: Not implemented for %d \n", ev->u.any.type); + ErrorF("[dix] EventToXI: Not implemented for %d \n", ev->any.type); return BadImplementation; } @@ -153,7 +153,7 @@ EventToXI(InternalEvent *ev, xEvent **xi, int *count) int EventToXI2(InternalEvent *ev, xEvent **xi) { - switch (ev->u.any.type) + switch (ev->any.type) { case ET_Motion: case ET_ButtonPress: @@ -172,7 +172,7 @@ EventToXI2(InternalEvent *ev, xEvent **xi) } - ErrorF("[dix] EventToXI2: Not implemented for %d \n", ev->u.any.type); + ErrorF("[dix] EventToXI2: Not implemented for %d \n", ev->any.type); return BadImplementation; } @@ -472,7 +472,7 @@ int GetCoreType(InternalEvent *event) { int coretype = 0; - switch(event->u.any.type) + switch(event->any.type) { case ET_Motion: coretype = MotionNotify; break; case ET_ButtonPress: coretype = ButtonPress; break; @@ -491,7 +491,7 @@ int GetXIType(InternalEvent *event) { int xitype = 0; - switch(event->u.any.type) + switch(event->any.type) { case ET_Motion: xitype = DeviceMotionNotify; break; case ET_ButtonPress: xitype = DeviceButtonPress; break; @@ -513,7 +513,7 @@ GetXI2Type(InternalEvent *event) { int xi2type = 0; - switch(event->u.any.type) + switch(event->any.type) { case ET_Motion: xi2type = XI_Motion; break; case ET_ButtonPress: xi2type = XI_ButtonPress; break; -- cgit v1.2.3