X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f55d9f749b61b3a8435c58a285ac096726d15040..6f8dd114f41f0cfdf3670267e88f7dea1da18f5a:/src/osx/carbon/window.cpp diff --git a/src/osx/carbon/window.cpp b/src/osx/carbon/window.cpp index 21e9c4174a..39ed9fe0bf 100644 --- a/src/osx/carbon/window.cpp +++ b/src/osx/carbon/window.cpp @@ -288,7 +288,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl #endif wxLogTrace(_T("Focus"), _T("focus lost(%p)"), wx_static_cast(void*, thisWindow)); - + // remove this as soon as posting the synthesized event works properly static bool inKillFocusEvent = false ; @@ -841,22 +841,15 @@ void wxMacControl::Init() m_macControlEventHandler = NULL; } -void wxMacControl::SetReference( URefCon data ) -{ - SetControlReference( m_controlRef , data ); -} - void wxMacControl::RemoveFromParent() { // nothing to do here for carbon + HIViewRemoveFromSuperview(m_controlRef); } void wxMacControl::Embed( wxWidgetImpl *parent ) { - // copied from MacPostControlCreate - ControlRef container = (ControlRef) parent->GetWXWidget() ; - wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ; - ::EmbedControl( m_controlRef , container ) ; + HIViewAddSubview((ControlRef)parent->GetWXWidget(), m_controlRef); } void wxMacControl::SetNeedsDisplay( const wxRect* rect )