]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/frame.cpp
Added clipboard cut and paste
[wxWidgets.git] / src / msw / frame.cpp
index 3b555428be2a90739f1a206222e639c0fad5df54..d15747b1ea96bfbfdbe1e46cc890928b7a1cf575 100644 (file)
@@ -112,6 +112,8 @@ void wxFrame::Init()
     m_fsToolBarHeight = 0;
 //  m_fsMenu = 0;
 
+    m_wasMinimized = FALSE;
+
     m_winLastFocused = (wxWindow *)NULL;
 }
 
@@ -523,7 +525,21 @@ void wxFrame::IconizeChildFrames(bool bIconize)
 #endif // wxUSE_MDI_ARCHITECTURE
            )
         {
-            frame->Iconize(bIconize);
+            // we don't want to restore the child frames which had been
+            // iconized even before we were iconized, so save the child frame
+            // status when iconizing the parent frame and check it when
+            // restoring it
+            if ( bIconize )
+            {
+                // note that we shouldn't touch the hidden frames neither
+                // because iconizing/restoring them would show them as a side
+                // effect
+                frame->m_wasMinimized = frame->IsIconized() || !frame->IsShown();
+            }
+
+            // this test works for both iconizing and restoring
+            if ( !frame->m_wasMinimized )
+                frame->Iconize(bIconize);
         }
     }
 }