diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 06d75e4611..f33b1a2a3d 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -810,8 +810,6 @@ bool wxWindowMac::Create(wxWindowMac *parent, wxWindowID id, if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) ) return FALSE; - parent->AddChild(this); - m_windowVariant = parent->GetWindowVariant() ; if ( m_macIsUserPane ) @@ -865,6 +863,7 @@ void wxWindowMac::MacPostControlCreate(const wxPoint& pos, const wxSize& size) wxASSERT_MSG( m_peer != NULL && m_peer->Ok() , wxT("No valid mac control") ) ; m_peer->SetReference( (long) this ) ; + GetParent()->AddChild(this); MacInstallEventHandler( (WXWidget) m_peer->GetControlRef() );