From 8ceeb6c2e004e9fd9ad79d81c074147f831988be Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 4 Jun 2009 04:25:39 +0000 Subject: [PATCH] avoid overdrawing, fixes #10865 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/window.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 ) -- 2.45.2