return false ;
wxBrush brush ;
- if ( col == wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE) )
+ wxColour newCol(GetBackgroundColour());
+ if ( newCol == wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE) )
{
brush.MacSetTheme( kThemeBrushDocumentWindowBackground ) ;
}
- else if ( col == wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE ) )
+ else if ( newCol == wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE ) )
{
brush.MacSetTheme( kThemeBrushDialogBackgroundActive ) ;
}
else
{
- brush.SetColour( col ) ;
+ brush.SetColour( newCol ) ;
}
MacSetBackgroundBrush( brush ) ;
if ( y ) pt.y = *y ;
if ( !IsTopLevel() )
- HIViewConvertPoint( &pt , *m_peer , (ControlRef) MacGetTopLevelWindow()->GetHandle() ) ;
+ {
+ wxTopLevelWindowMac* top = MacGetTopLevelWindow();
+ if (top)
+ HIViewConvertPoint( &pt , *m_peer , (ControlRef) top->GetHandle() ) ;
+ }
if ( x ) *x = (int) pt.x ;
if ( y ) *y = (int) pt.y ;