backport of r60955

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_9_0_BRANCH@60957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2009-06-10 04:22:13 +00:00
parent 1d7d632784
commit 9b7d888d26
2 changed files with 9 additions and 3 deletions

View File

@@ -99,12 +99,18 @@ bool wxNonOwnedWindowCarbonImpl::SetBackgroundColour(const wxColour& col )
if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
{
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDocumentWindowBackground, false ) ;
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
m_wxPeer->SetBackgroundStyle(wxBG_STYLE_SYSTEM);
// call directly if object is not yet completely constructed
if ( m_wxPeer->GetNonOwnedPeer() == NULL )
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
}
else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
{
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDialogBackgroundActive, false ) ;
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
m_wxPeer->SetBackgroundStyle(wxBG_STYLE_SYSTEM);
// call directly if object is not yet completely constructed
if ( m_wxPeer->GetNonOwnedPeer() == NULL )
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
}
return true;
}

View File

@@ -346,7 +346,7 @@ bool wxNonOwnedWindow::SetBackgroundStyle(wxBackgroundStyle style)
if ( !wxWindow::SetBackgroundStyle(style) )
return false ;
return m_nowpeer->SetBackgroundStyle(style);
return m_nowpeer ? m_nowpeer->SetBackgroundStyle(style) : true;
}
void wxNonOwnedWindow::DoMoveWindow(int x, int y, int width, int height)