]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/mdi.cpp
cleanup - reformat
[wxWidgets.git] / src / mac / carbon / mdi.cpp
index c7d898778bc41aa4f1dffa9427b6118944284761..c3951ca0e1965026b346b3ee6acc866498de35be 100644 (file)
@@ -9,18 +9,17 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "mdi.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #if wxUSE_MDI
 
-#include "wx/mdi.h"
-#include "wx/menu.h"
-#include "wx/settings.h"
-#include "wx/log.h"
+#ifndef WX_PRECOMP
+    #include "wx/mdi.h"
+    #include "wx/log.h"
+    #include "wx/menu.h"
+    #include "wx/settings.h"
+    #include "wx/statusbr.h"
+#endif
 
 #include "wx/mac/private.h"
 #include "wx/mac/uma.h"
@@ -290,11 +289,14 @@ bool wxMDIParentFrame::ShouldBeVisible() const
           node;
           node = node->GetNext() )
     {
-        if ( !wxDynamicCast(node->GetData(), wxMDIChildFrame)
+        wxWindow *win = node->GetData();
+
+        if ( win->IsShown()
+                && !wxDynamicCast(win, wxMDIChildFrame)
 #if wxUSE_STATUSBAR
-                && node->GetData() != GetStatusBar()
+                    && win != GetStatusBar()
 #endif // wxUSE_STATUSBAR
-                    && node->GetData() != GetClientWindow() )
+                        && win != GetClientWindow() )
         {
             // if we have a non-MDI child, do remain visible so that it could
             // be used