backport avoid overdrawing, see #10865
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_9_0_BRANCH@60887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -184,7 +184,6 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
bool created = false ;
|
|
||||||
CGContextRef cgContext = NULL ;
|
CGContextRef cgContext = NULL ;
|
||||||
OSStatus err = cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef, &cgContext) ;
|
OSStatus err = cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef, &cgContext) ;
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
@@ -208,7 +207,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
|||||||
iter = iter->GetParent() ;
|
iter = iter->GetParent() ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CGContextSetAlpha( cgContext , alpha ) ;
|
CGContextSetAlpha( cgContext, alpha ) ;
|
||||||
|
|
||||||
if ( thisWindow->GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT )
|
if ( thisWindow->GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT )
|
||||||
{
|
{
|
||||||
@@ -229,16 +228,20 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
|||||||
( thisWindow->IsTopLevel() && thisWindow->GetBackgroundStyle() == wxBG_STYLE_SYSTEM ) )
|
( thisWindow->IsTopLevel() && thisWindow->GetBackgroundStyle() == wxBG_STYLE_SYSTEM ) )
|
||||||
{
|
{
|
||||||
if ( thisWindow->GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
|
if ( thisWindow->GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
|
||||||
CallNextEventHandler( handler ,event ) ;
|
{
|
||||||
|
CallNextEventHandler( handler,event ) ;
|
||||||
|
result = noErr ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = noErr ;
|
||||||
|
}
|
||||||
thisWindow->MacPaintChildrenBorders();
|
thisWindow->MacPaintChildrenBorders();
|
||||||
}
|
}
|
||||||
thisWindow->MacSetCGContextRef( NULL ) ;
|
thisWindow->MacSetCGContextRef( NULL ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( created )
|
|
||||||
CGContextRelease( cgContext ) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( allocatedRgn )
|
if ( allocatedRgn )
|
||||||
|
Reference in New Issue
Block a user