From 7807a2b4998ef075b5ac7c05ab48274c28b477ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 19 Sep 2006 13:07:46 +0000 Subject: [PATCH] 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 --- src/dfb/toplevel.cpp | 4 ++++ src/dfb/window.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) 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(); + } } // --------------------------------------------------------------------------- -- 2.45.2