X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a4fec5b41e2109e2c4822d3015aa0e442754bfbb..b85b06e13d22e7fc1604ec1a49caa1227a1b3d36:/src/osx/carbon/window.cpp diff --git a/src/osx/carbon/window.cpp b/src/osx/carbon/window.cpp index 875b62a41e..b3d85ada77 100644 --- a/src/osx/carbon/window.cpp +++ b/src/osx/carbon/window.cpp @@ -184,7 +184,6 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl #endif { - bool created = false ; CGContextRef cgContext = NULL ; OSStatus err = cEvent.GetParameter(kEventParamCGContextRef, &cgContext) ; if ( err != noErr ) @@ -208,7 +207,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl iter = iter->GetParent() ; } } - CGContextSetAlpha( cgContext , alpha ) ; + CGContextSetAlpha( cgContext, alpha ) ; if ( thisWindow->GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT ) { @@ -229,16 +228,20 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl ( thisWindow->IsTopLevel() && thisWindow->GetBackgroundStyle() == wxBG_STYLE_SYSTEM ) ) { if ( thisWindow->GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT ) - CallNextEventHandler( handler ,event ) ; + { + CallNextEventHandler( handler,event ) ; + result = noErr ; + } } } + else + { + result = noErr ; + } thisWindow->MacPaintChildrenBorders(); } thisWindow->MacSetCGContextRef( NULL ) ; } - - if ( created ) - CGContextRelease( cgContext ) ; } if ( allocatedRgn )