]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/toplvcmn.cpp
Delay checking for the requested sash position until the first
[wxWidgets.git] / src / common / toplvcmn.cpp
index dc1a79b9167607485d131bf7a440ed58a7ac392b..aa0d96d70c7962cb9fbab2093e94ff3351909bf2 100644 (file)
@@ -65,7 +65,7 @@ wxTopLevelWindowBase::~wxTopLevelWindowBase()
     bool shouldExit = IsLastBeforeExit();
 
     wxTopLevelWindows.DeleteObject(this);
-
+    
     if ( shouldExit )
     {
         // then do it
@@ -80,6 +80,17 @@ bool wxTopLevelWindowBase::Destroy()
     if ( !wxPendingDelete.Member(this) )
         wxPendingDelete.Append(this);
 
+    if (wxTopLevelWindows.GetCount() > 1)
+    {
+        // Hide it immediately. This should
+        // not be done if this TLW is the
+        // only one left since we then would
+        // risk not to get any idle events
+        // at all anymore during which we 
+        // could delete any pending events.
+        Hide();
+    }
+
     return TRUE;
 }