]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
Added support for delayed deactivation of windows (for MDI)
[wxWidgets.git] / src / gtk1 / window.cpp
index ca83cf7c87e437426aa89a9b2df87fae57085612..7339c08f0796ea757facaaa25da112f52e1737d9 100644 (file)
@@ -3605,6 +3605,18 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect )
     if (g_isIdle)
         wxapp_install_idle_handler();
 
+    wxRect myRect(0,0,0,0);
+    if (m_wxwindow && rect)
+    {
+        myRect.SetSize(wxSize( m_wxwindow->allocation.width,
+                               m_wxwindow->allocation.height));
+        myRect.Intersect(*rect);
+        if (!myRect.width || !myRect.height)
+            // nothing to do, rectangle is empty
+            return;
+        rect = &myRect;
+    }
+
     if (eraseBackground && m_wxwindow && m_wxwindow->window)
     {
         if (rect)