]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/mdi.cpp
Fix uninitialized variable warning in wxMSW wxFileSystemWatcher code.
[wxWidgets.git] / src / osx / carbon / mdi.cpp
index f236d572a429dfe6c3ed4ae24bacd730d9172aef..80f31dc379d45409f3389d4143b05f0678c0eab7 100644 (file)
@@ -88,7 +88,7 @@ void wxMDIParentFrame::Init()
 }
 
 bool wxMDIParentFrame::Create(wxWindow *parent,
 }
 
 bool wxMDIParentFrame::Create(wxWindow *parent,
-    wxWindowID id,
+    wxWindowID winid,
     const wxString& title,
     const wxPoint& pos,
     const wxSize& size,
     const wxString& title,
     const wxPoint& pos,
     const wxSize& size,
@@ -114,7 +114,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
         m_windowMenu->Append(IDM_WINDOWNEXT, wxT("&Next"));
     }
 
         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;
         return false;
 
     m_parentFrameActive = true;
@@ -328,7 +328,7 @@ void wxMDIChildFrame::Init()
 }
 
 bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
 }
 
 bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
-                             wxWindowID id,
+                             wxWindowID winid,
                              const wxString& title,
                              const wxPoint& pos,
                              const wxSize& size,
                              const wxString& title,
                              const wxPoint& pos,
                              const wxSize& size,
@@ -339,10 +339,10 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
 
     SetName(name);
 
 
     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 );
 
 
     SetTitle( title );
 
@@ -360,7 +360,7 @@ void wxMDIChildFrame::MacActivate(long timestamp, bool activating)
 {
     wxLogTrace(TRACE_MDI, wxT("MDI child=%p  MacActivate(0x%08lx,%s)"),this, timestamp, activating ? wxT("ACTIV") : wxT("deact"));
 
 {
     wxLogTrace(TRACE_MDI, wxT("MDI child=%p  MacActivate(0x%08lx,%s)"),this, timestamp, activating ? wxT("ACTIV") : wxT("deact"));
 
-    wxMDIParentFrame *mdiparent = wxDynamicCast(m_parent, wxMDIParentFrame);
+    wxMDIParentFrame *mdiparent = m_mdiParent;
     wxASSERT(mdiparent);
 
     if (activating)
     wxASSERT(mdiparent);
 
     if (activating)
@@ -417,7 +417,9 @@ void wxMDIChildFrame::MacActivate(long timestamp, bool activating)
 // MDI operations
 void wxMDIChildFrame::Activate()
 {
 // MDI operations
 void wxMDIChildFrame::Activate()
 {
-    Raise ();
+    // The base class method calls Activate() so skip it to avoid infinite
+    // recursion and go directly to the real Raise() implementation.
+    wxFrame::Raise();
 }
 
 //-----------------------------------------------------------------------------
 }
 
 //-----------------------------------------------------------------------------