X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d18a7061666b8b890616c91cd5df422502c3f303..e47c778924ef4f0456edd5912cf7a2131ecb634f:/src/dfb/dcclient.cpp diff --git a/src/dfb/dcclient.cpp b/src/dfb/dcclient.cpp index 4cac80be25..5436d3e20d 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; @@ -74,7 +74,11 @@ wxIDirectFBSurfacePtr CreateDummySurface(wxWindow *win, const wxRect *rect) wxLogTrace(TRACE_PAINT, _T("%p ('%s'): creating dummy DC surface"), win, win->GetName().c_str()); wxSize size(rect ? rect->GetSize() : win->GetSize()); - return win->GetDfbSurface()->CreateCompatible(size); + return win->GetDfbSurface()->CreateCompatible + ( + size, + wxIDirectFBSurface::CreateCompatible_NoBackBuffer + ); } //----------------------------------------------------------------------------- @@ -191,8 +195,14 @@ wxWindowDC::~wxWindowDC() if ( m_shouldFlip ) { - // FIXME: flip only modified parts of the surface - surface->FlipToFront(); + DFBSurfaceCapabilities caps = DSCAPS_NONE; + surface->GetCapabilities(&caps); + if ( caps & DSCAPS_DOUBLE ) + { + // FIXME: flip only modified parts of the surface + surface->FlipToFront(); + } + // else: the surface is not double-buffered and so cannot be flipped } // else: don't flip the surface, wxTLW will do it when it finishes // painting of its invalidated areas