X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d2824cdb7f6ac2371fefd3d44eff62bb48ebc0a3..08670ea85abf4b4946a9ce64971b591d7b1ee30b:/src/osx/carbon/mdi.cpp diff --git a/src/osx/carbon/mdi.cpp b/src/osx/carbon/mdi.cpp index 3367c1bc8b..762f275734 100644 --- a/src/osx/carbon/mdi.cpp +++ b/src/osx/carbon/mdi.cpp @@ -71,6 +71,8 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) #endif } #elif defined(wxOSX_USE_COCOA) + wxUnusedVar(inActivate); + wxUnusedVar(inWindowRef); // TODO: implement me! #endif } @@ -86,7 +88,7 @@ void wxMDIParentFrame::Init() } bool wxMDIParentFrame::Create(wxWindow *parent, - wxWindowID id, + wxWindowID winid, const wxString& title, const wxPoint& pos, const wxSize& size, @@ -112,14 +114,16 @@ bool wxMDIParentFrame::Create(wxWindow *parent, m_windowMenu->Append(IDM_WINDOWNEXT, wxT("&Next")); } - if ( !wxFrame::Create( parent , id , title , pos , size , style , name ) ) + if ( !wxFrame::Create( parent , winid , title , pos , size , style , name ) ) return false; m_parentFrameActive = true; m_clientWindow = OnCreateClient(); + if ( !m_clientWindow || !m_clientWindow->CreateClient(this, style) ) + return false; - return m_clientWindow != NULL; + return true; } wxMDIParentFrame::~wxMDIParentFrame() @@ -245,7 +249,9 @@ void wxMDIParentFrame::MacActivate(long timestamp, bool activating) else // schedule ourselves for deactivation { if (s_macDeactivateWindow) + { wxLogTrace(TRACE_MDI, wxT("window=%p SHOULD have been deactivated, oh well!"), s_macDeactivateWindow); + } wxLogTrace(TRACE_MDI, wxT("Scheduling delayed MDI Parent deactivation")); s_macDeactivateWindow = this; @@ -322,7 +328,7 @@ void wxMDIChildFrame::Init() } bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, - wxWindowID id, + wxWindowID winid, const wxString& title, const wxPoint& pos, const wxSize& size, @@ -333,10 +339,10 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, SetName(name); - if ( id == wxID_ANY ) - id = (int)NewControlId(); + if ( winid == wxID_ANY ) + winid = (int)NewControlId(); - wxNonOwnedWindow::Create( parent, id, pos , size , MacRemoveBordersFromStyle(style) , name ) ; + wxNonOwnedWindow::Create( parent, winid, pos , size , MacRemoveBordersFromStyle(style) , name ) ; SetTitle( title ); @@ -398,7 +404,9 @@ void wxMDIChildFrame::MacActivate(long timestamp, bool activating) else // schedule ourselves for deactivation { if (s_macDeactivateWindow) + { wxLogTrace(TRACE_MDI, wxT("window=%p SHOULD have been deactivated, oh well!"), s_macDeactivateWindow); + } wxLogTrace(TRACE_MDI, wxT("Scheduling delayed deactivation")); s_macDeactivateWindow = this;