fixed TLWs resizing to invalidate the DFB surface used for painting

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2006-09-19 13:07:46 +00:00
parent f97d937077
commit 7807a2b499
2 changed files with 12 additions and 0 deletions

View File

@ -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();

View File

@ -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();
}
}
// ---------------------------------------------------------------------------