diff options
author | marha <marha@users.sourceforge.net> | 2011-04-07 07:41:54 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-07 07:41:54 +0000 |
commit | de1c6801fc854692d39fb2f8d53bf54ab25a1287 (patch) | |
tree | 884c4234434a8da73bd62ef44799b49c752ecd66 /xorg-server/Xext/geext.c | |
parent | 704e01fc69ebf6302aa1876906805147248abdaa (diff) | |
download | vcxsrv-de1c6801fc854692d39fb2f8d53bf54ab25a1287.tar.gz vcxsrv-de1c6801fc854692d39fb2f8d53bf54ab25a1287.tar.bz2 vcxsrv-de1c6801fc854692d39fb2f8d53bf54ab25a1287.zip |
xserver pixman mesa git update 7 Apr 2011
Diffstat (limited to 'xorg-server/Xext/geext.c')
-rw-r--r-- | xorg-server/Xext/geext.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xorg-server/Xext/geext.c b/xorg-server/Xext/geext.c index a6fbb0947..18f8ffeac 100644 --- a/xorg-server/Xext/geext.c +++ b/xorg-server/Xext/geext.c @@ -49,6 +49,7 @@ static const int version_requests[] = { static void SGEGenericEvent(xEvent* from, xEvent* to); #define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) +#define EXT_MASK(ext) ((ext) & 0x7F) /************************************************************/ /* request handlers */ @@ -191,8 +192,8 @@ SGEGenericEvent(xEvent* from, xEvent* to) return; } - if (GEExtensions[gefrom->extension & 0x7F].evswap) - GEExtensions[gefrom->extension & 0x7F].evswap(gefrom, geto); + if (GEExtensions[EXT_MASK(gefrom->extension)].evswap) + GEExtensions[EXT_MASK(gefrom->extension)].evswap(gefrom, geto); } /* Init extension, register at server. @@ -241,11 +242,11 @@ void GERegisterExtension(int extension, void (*ev_swap)(xGenericEvent* from, xGenericEvent* to)) { - if ((extension & 0x7F) >= MAXEXTENSIONS) + if (EXT_MASK(extension) >= MAXEXTENSIONS) FatalError("GE: extension > MAXEXTENSIONS. This should not happen.\n"); /* extension opcodes are > 128, might as well save some space here */ - GEExtensions[extension & 0x7f].evswap = ev_swap; + GEExtensions[EXT_MASK(extension)].evswap = ev_swap; } |