summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-25 23:48:16 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-26 00:42:04 -0700
commitd5fee2b638fabeb8bec31a24e57d5c2a232d0893 (patch)
tree7d02c6c91838407becbeae37ed1b1d323e858660
parent5701ab4a441eb113abd0851b0d71b82d12112854 (diff)
XQuartz: applewm: Correct byte swapping in event notifications
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--hw/xquartz/applewm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index 27fb125d3..55976c454 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -725,10 +725,12 @@ AppleWMExtensionInit(
NULL,
StandardMinorOpcode)))
{
+ size_t i;
WMReqCode = (unsigned char)extEntry->base;
WMErrorBase = extEntry->errorBase;
WMEventBase = extEntry->eventBase;
- EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent;
+ for (i=0; i < AppleWMNumberEvents; i++)
+ EventSwapVector[WMEventBase + i] = (EventSwapPtr) SNotifyEvent;
appleWMProcs = procsPtr;
}
}