X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b6c95eb5fbb5bcec4891d5767ffeffe3915e6f0..9cb0c458c4601f444437f7e816efe654158eaf90:/src/univ/winuniv.cpp diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 90bb87c58f..bea3acdaf1 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -145,6 +145,11 @@ bool wxWindow::Create(wxWindow *parent, long style, const wxString& name) { + // Get default border + wxBorder border = GetBorder(style); + style &= ~wxBORDER_MASK; + style |= border; + long actualStyle = style; // we add wxCLIP_CHILDREN to get the same ("natural") behaviour under MSW @@ -361,6 +366,11 @@ bool wxWindow::DoDrawBackground(wxDC& dc) wxWindow * const parent = GetParent(); if ( HasTransparentBackground() && !UseBgCol() && parent ) { + // DirectFB paints the parent first, then its child windows, so by + // the time this code is called, parent's background was already + // drawn and there's no point in (imperfectly!) duplicating the work + // here: +#ifndef __WXDFB__ wxASSERT( !IsTopLevel() ); wxPoint pos = GetPosition(); @@ -383,6 +393,7 @@ bool wxWindow::DoDrawBackground(wxDC& dc) // Restore DC logical origin dc.SetLogicalOrigin( org_x, org_y ); +#endif // !__WXDFB__ } else { @@ -659,7 +670,7 @@ void wxWindow::OnSize(wxSizeEvent& event) } } else - if (HasFlag( wxSUNKEN_BORDER ) || HasFlag( wxRAISED_BORDER )) + if (HasFlag( wxSUNKEN_BORDER ) || HasFlag( wxRAISED_BORDER ) || HasFlag( wxBORDER_THEME )) { if (newSize.y > m_oldSize.y) {