diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2010-09-28 09:48:41 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2010-09-28 09:50:34 -0700 |
commit | f4926709485c0605f0b1171c84c803b68eebfc38 (patch) | |
tree | feb439167aaf5c4c4fb5f0bcb83ddc0e74a2aefe | |
parent | c36ca7b1862ecd86df089f4e1933379a113928ea (diff) |
XQuartz: Move use of static dispatch procs after declaration
This fixes fallout from cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | hw/xquartz/applewm.c | 54 | ||||
-rw-r--r-- | hw/xquartz/xpr/appledri.c | 41 |
2 files changed, 47 insertions, 48 deletions
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c index cd2bdf0ba..ec20534e0 100644 --- a/hw/xquartz/applewm.c +++ b/hw/xquartz/applewm.c @@ -103,33 +103,6 @@ make_box (int x, int y, int w, int h) return r; } -void -AppleWMExtensionInit( - AppleWMProcsPtr procsPtr) -{ - ExtensionEntry* extEntry; - - ClientType = CreateNewResourceType(WMFreeClient, "WMClient"); - EventType = CreateNewResourceType(WMFreeEvents, "WMEvent"); - eventResource = FakeClientID(0); - - if (ClientType && EventType && - (extEntry = AddExtension(APPLEWMNAME, - AppleWMNumberEvents, - AppleWMNumberErrors, - ProcAppleWMDispatch, - SProcAppleWMDispatch, - NULL, - StandardMinorOpcode))) - { - WMReqCode = (unsigned char)extEntry->base; - WMErrorBase = extEntry->errorBase; - WMEventBase = extEntry->eventBase; - EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; - appleWMProcs = procsPtr; - } -} - /* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */ void AppleWMSetScreenOrigin( @@ -734,3 +707,30 @@ SProcAppleWMDispatch ( return BadRequest; } } + +void +AppleWMExtensionInit( + AppleWMProcsPtr procsPtr) +{ + ExtensionEntry* extEntry; + + ClientType = CreateNewResourceType(WMFreeClient, "WMClient"); + EventType = CreateNewResourceType(WMFreeEvents, "WMEvent"); + eventResource = FakeClientID(0); + + if (ClientType && EventType && + (extEntry = AddExtension(APPLEWMNAME, + AppleWMNumberEvents, + AppleWMNumberErrors, + ProcAppleWMDispatch, + SProcAppleWMDispatch, + NULL, + StandardMinorOpcode))) + { + WMReqCode = (unsigned char)extEntry->base; + WMErrorBase = extEntry->errorBase; + WMEventBase = extEntry->eventBase; + EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; + appleWMProcs = procsPtr; + } +} diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c index ebd4a4374..ff70a381a 100644 --- a/hw/xquartz/xpr/appledri.c +++ b/hw/xquartz/xpr/appledri.c @@ -76,27 +76,6 @@ typedef struct _DRIEvent { unsigned int mask; } DRIEventRec; - -void -AppleDRIExtensionInit(void) -{ - ExtensionEntry* extEntry; - - if (DRIExtensionInit() && - (extEntry = AddExtension(APPLEDRINAME, - AppleDRINumberEvents, - AppleDRINumberErrors, - ProcAppleDRIDispatch, - SProcAppleDRIDispatch, - AppleDRIResetProc, - StandardMinorOpcode))) { - DRIReqCode = (unsigned char)extEntry->base; - DRIErrorBase = extEntry->errorBase; - DRIEventBase = extEntry->eventBase; - EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent; - } -} - /*ARGSUSED*/ static void AppleDRIResetProc ( @@ -419,3 +398,23 @@ SProcAppleDRIDispatch ( return BadRequest; } } + +void +AppleDRIExtensionInit(void) +{ + ExtensionEntry* extEntry; + + if (DRIExtensionInit() && + (extEntry = AddExtension(APPLEDRINAME, + AppleDRINumberEvents, + AppleDRINumberErrors, + ProcAppleDRIDispatch, + SProcAppleDRIDispatch, + AppleDRIResetProc, + StandardMinorOpcode))) { + DRIReqCode = (unsigned char)extEntry->base; + DRIErrorBase = extEntry->errorBase; + DRIEventBase = extEntry->eventBase; + EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent; + } +} |