]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed TLWs resizing to invalidate the DFB surface used for painting
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 19 Sep 2006 13:07:46 +0000 (13:07 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 19 Sep 2006 13:07:46 +0000 (13:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/dfb/toplevel.cpp
src/dfb/window.cpp

index b607ecc863cc93b0b33c32a965e986fc8f202652..9166ffffd46f6d4976c79faf8afdbbc6b175ce46 100644 (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();
index ff3b103a895ac3b0a17a32c9f4b83d8dacc0d20d..0e78f4b1745266c2ecba55e91e3eb2a42b522965 100644 (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();
+    }
 }
 
 // ---------------------------------------------------------------------------