]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/window.cpp
added wxWindow::IsVisible() method
[wxWidgets.git] / src / dfb / window.cpp
index bd9f6cdce549acc712c00c19c418d36fc9735f88..014e7c32be0c47f173188e4edf6596781e84eae5 100644 (file)
@@ -646,11 +646,10 @@ void wxWindowDFB::Thaw()
 
 void wxWindowDFB::PaintWindow(const wxRect& rect, bool eraseBackground)
 {
-    if ( IsFrozen() )
-        return; // don't paint anything if the window is frozen
+    wxCHECK_RET( !IsFrozen() && IsShown(), _T("shouldn't be called") );
 
     wxLogTrace(TRACE_PAINT,
-               _T("%p ('%s'): paiting region [x=%i,y=%i,w=%i,h=%i]"),
+               _T("%p ('%s'): painting region [x=%i,y=%i,w=%i,h=%i]"),
                this, GetName().c_str(),
                rect.x, rect.y, rect.width, rect.height);
 
@@ -694,6 +693,9 @@ void wxWindowDFB::PaintWindow(const wxRect& rect, bool eraseBackground)
     {
         wxWindow *child = *i;
 
+        if ( child->IsFrozen() || !child->IsShown() )
+            continue; // don't paint anything if the window is frozen or hidden
+
         // compute child's area to repaint
         wxRect childrect(child->GetRect());
         childrect.Offset(origin);