X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7e2baeb41321aedca928608f816f03c13afdeff9..f0ed40adbf95b79923f4ef12688876156af89061:/src/dfb/dcclient.cpp diff --git a/src/dfb/dcclient.cpp b/src/dfb/dcclient.cpp index 1d1354843e..1045b6305e 100644 --- a/src/dfb/dcclient.cpp +++ b/src/dfb/dcclient.cpp @@ -45,7 +45,7 @@ // boundaries ("hidden behind its borders"), recursively: static wxRect GetUncoveredWindowArea(wxWindow *win) { - wxRect r(win->GetRect()); + wxRect r(win->GetSize()); if ( win->IsTopLevel() ) return r; @@ -96,6 +96,8 @@ void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect) { wxCHECK_RET( win, _T("invalid window") ); + m_win = win; + // obtain the surface used for painting: wxPoint origin; wxIDirectFBSurfacePtr surface; @@ -154,6 +156,7 @@ void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect) } else { + m_winRect = r; DFBRectangle dfbrect = { r.x, r.y, r.width, r.height }; surface = win->GetDfbSurface()->GetSubSurface(&dfbrect); @@ -176,7 +179,7 @@ void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect) r.x, r.y, r.GetRight(), r.GetBottom(), origin.x, origin.y); - Init(surface); + DFBInit(surface); SetFont(win->GetFont()); // offset coordinates to account for subsurface's origin coordinates: @@ -195,6 +198,10 @@ wxWindowDC::~wxWindowDC() if ( m_shouldFlip ) { + // paint overlays on top of the surface being drawn to by this DC + // before showing anything on the screen: + m_win->PaintOverlays(m_winRect); + DFBSurfaceCapabilities caps = DSCAPS_NONE; surface->GetCapabilities(&caps); if ( caps & DSCAPS_DOUBLE )