aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-07 07:49:55 +0000
committermarha <marha@users.sourceforge.net>2011-04-07 07:49:55 +0000
commit143921f2eb615190ed77e57a6f93f02ffb325c91 (patch)
tree19c73ab0992ee863cc67e7b98da84d2347a77ef7 /xorg-server/Xext
parente2b908c356746281aba48128da7dc15a28f5a773 (diff)
parentde1c6801fc854692d39fb2f8d53bf54ab25a1287 (diff)
downloadvcxsrv-143921f2eb615190ed77e57a6f93f02ffb325c91.tar.gz
vcxsrv-143921f2eb615190ed77e57a6f93f02ffb325c91.tar.bz2
vcxsrv-143921f2eb615190ed77e57a6f93f02ffb325c91.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/Xext')
-rw-r--r--xorg-server/Xext/geext.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xorg-server/Xext/geext.c b/xorg-server/Xext/geext.c
index 93e5277cc..5e7b9c29b 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;
}