fixing custom background on non owned windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -211,7 +211,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
|||||||
if ( thisWindow->MacIsUserPane() )
|
if ( thisWindow->MacIsUserPane() )
|
||||||
{
|
{
|
||||||
static float color = 0.5 ;
|
static float color = 0.5 ;
|
||||||
static channel = 0 ;
|
static int channel = 0 ;
|
||||||
HIRect bounds;
|
HIRect bounds;
|
||||||
CGContextRef cgContext = cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef) ;
|
CGContextRef cgContext = cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef) ;
|
||||||
|
|
||||||
@@ -3171,11 +3171,15 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
|
|||||||
|
|
||||||
void wxWindowMac::OnPaint( wxPaintEvent & WXUNUSED(event) )
|
void wxWindowMac::OnPaint( wxPaintEvent & WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL
|
// for native controls: call their native paint method
|
||||||
&& GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
|
if ( !MacIsUserPane() || ( IsTopLevel() && GetBackgroundStyle() == wxBG_STYLE_SYSTEM ) )
|
||||||
CallNextEventHandler(
|
{
|
||||||
(EventHandlerCallRef)wxTheApp->MacGetCurrentEventHandlerCallRef() ,
|
if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL
|
||||||
(EventRef) wxTheApp->MacGetCurrentEvent() ) ;
|
&& GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
|
||||||
|
CallNextEventHandler(
|
||||||
|
(EventHandlerCallRef)wxTheApp->MacGetCurrentEventHandlerCallRef() ,
|
||||||
|
(EventRef) wxTheApp->MacGetCurrentEvent() ) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMac::MacHandleControlClick(WXWidget WXUNUSED(control),
|
void wxWindowMac::MacHandleControlClick(WXWidget WXUNUSED(control),
|
||||||
|
Reference in New Issue
Block a user