From d5fee2b638fabeb8bec31a24e57d5c2a232d0893 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 25 Oct 2011 23:48:16 -0700 Subject: XQuartz: applewm: Correct byte swapping in event notifications Signed-off-by: Jeremy Huddleston --- hw/xquartz/applewm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } } -- cgit v1.2.3