[PATCH 1/8] dix: use xi2_get_type instead of manual typecast

Peter Hutterer peter.hutterer at who-t.net
Thu May 26 22:13:51 PDT 2011


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/events.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index b60c299..ec4bf59 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3997,7 +3997,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
             rc = EventToXI2(event, &xi2);
             if (rc == Success)
             {
-                int evtype = ((xGenericEvent*)xi2)->evtype;
+                int evtype = xi2_get_type(xi2);
                 mask = grab->xi2mask[XIAllDevices][evtype/8] |
                     grab->xi2mask[XIAllMasterDevices][evtype/8] |
                     grab->xi2mask[thisDev->id][evtype/8];
-- 
1.7.5.1



More information about the xorg-devel mailing list