X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ea3cdc4f89bdafcfe2345279b27698a25a2a4c71..b98738705265d77937c62bdfbf02343ccc1444eb:/src/mac/carbon/mdi.cpp diff --git a/src/mac/carbon/mdi.cpp b/src/mac/carbon/mdi.cpp index b009b1ebe6..542a76cdc7 100644 --- a/src/mac/carbon/mdi.cpp +++ b/src/mac/carbon/mdi.cpp @@ -117,6 +117,15 @@ void wxMDIParentFrame::SetMenuBar(wxMenuBar *menu_bar) wxFrame::SetMenuBar( menu_bar ) ; } +void wxMDIParentFrame::GetRectForTopLevelChildren(int *x, int *y, int *w, int *h) +{ + if(x) + *x = 0; + if(y) + *y = 0; + wxDisplaySize(w,h); +} + void wxMDIParentFrame::MacActivate(long timestamp, bool activating) { wxLogDebug(wxT("MDI PARENT=%p MacActivate(0x%08lx,%s)"),this,timestamp,activating?wxT("ACTIV"):wxT("deact")); @@ -219,17 +228,19 @@ void wxMDIParentFrame::ActivatePrevious() bool wxMDIParentFrame::Show( bool show ) { - if ( !wxFrame::Show(show) ) - return false; - // don't really show the MDI frame unless it has any children other than // MDI children as it is pretty useless in this case + if ( show ) { // TODO: check for other children - Move(-10000, -10000); + if(!GetToolBar()) + Move(-10000, -10000); } + if ( !wxFrame::Show(show) ) + return false; + return true; }