diff --git a/src/mac/carbon/mdi.cpp b/src/mac/carbon/mdi.cpp index c7d898778b..33cc7da623 100644 --- a/src/mac/carbon/mdi.cpp +++ b/src/mac/carbon/mdi.cpp @@ -290,11 +290,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