summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-25 23:49:33 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-28 18:31:10 -0700
commit0715469f1cb150261b51867df75892d26916ea05 (patch)
tree86e0e11d290d7bc5afc21d802f6a2d0c8ab4dd0b
parentbc2600466eea2af2d6a81fe1592d908565995cb2 (diff)
XQuartz: appledri: Correct byte swapping in event notifications
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit dc054fefc586c5b404fe0f949dbd456e5267c647)
-rw-r--r--hw/xquartz/xpr/appledri.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
index 129fc7836..80955fe27 100644
--- a/hw/xquartz/xpr/appledri.c
+++ b/hw/xquartz/xpr/appledri.c
@@ -541,9 +541,11 @@ AppleDRIExtensionInit(void)
SProcAppleDRIDispatch,
AppleDRIResetProc,
StandardMinorOpcode))) {
+ size_t i;
DRIReqCode = (unsigned char)extEntry->base;
DRIErrorBase = extEntry->errorBase;
DRIEventBase = extEntry->eventBase;
- EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent;
+ for (i=0; i < AppleDRINumberEvents; i++)
+ EventSwapVector[DRIEventBase + i] = (EventSwapPtr) SNotifyEvent;
}
}