diff --git a/src/dfb/toplevel.cpp b/src/dfb/toplevel.cpp index b607ecc863..9166ffffd4 100644 --- a/src/dfb/toplevel.cpp +++ b/src/dfb/toplevel.cpp @@ -214,7 +214,11 @@ void wxTopLevelWindowDFB::DoMoveWindow(int x, int y, int width, int height) wxSize cursize = GetSize(); if ( cursize.x != width || cursize.y != height ) { + // changing window's size changes its surface: + InvalidateDfbSurface(); + m_dfbwin->Resize(width, height); + // we must repaint the window after it changed size: if ( IsShown() ) DoRefreshWindow(); diff --git a/src/dfb/window.cpp b/src/dfb/window.cpp index ff3b103a89..0e78f4b174 100644 --- a/src/dfb/window.cpp +++ b/src/dfb/window.cpp @@ -173,6 +173,14 @@ wxIDirectFBSurfacePtr wxWindowDFB::GetDfbSurface() void wxWindowDFB::InvalidateDfbSurface() { m_surface = NULL; + + // surfaces of the children are subsurfaces of this window's surface, + // so they must be invalidated as well: + wxWindowList& children = GetChildren(); + for ( wxWindowList::iterator i = children.begin(); i != children.end(); ++i ) + { + (*i)->InvalidateDfbSurface(); + } } // ---------------------------------------------------------------------------