X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/17a2c5a10faebcf476fdb0c3637605cf0e84ea73..48d2ab90ee02b7e2441f33fa8575bf51f56a364e:/src/mac/control.cpp diff --git a/src/mac/control.cpp b/src/mac/control.cpp index 417aba00c8..5998a660fc 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -401,8 +401,11 @@ void wxControl::MacPostControlCreate() wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefintion ) ; } #if TARGET_CARBON +/* + only working under classic carbon m_macControlAction = *(**(ControlHandle)m_macControl).contrlDefProc ; (**(ControlHandle)m_macControl).contrlDefProc = (Handle) &wxMacControlActionUPP ; +*/ #else m_macControlAction = *(**(ControlHandle)m_macControl).contrlDefProc ; @@ -752,7 +755,7 @@ void wxControl::Refresh(bool eraseBack, const wxRect *rect) void wxControl::MacRedrawControl() { - if ( (ControlHandle) m_macControl && MacGetRootWindow() ) + if ( (ControlHandle) m_macControl && MacGetRootWindow() && m_macControlIsShown ) { wxClientDC dc(this) ; wxMacPortSetter helper(&dc) ; @@ -764,11 +767,6 @@ void wxControl::MacRedrawControl() void wxControl::OnPaint(wxPaintEvent& event) { - if ( IsKindOf( CLASSINFO( wxBitmapButton ) ) ) - { - int i ; - i = 0 ; - } if ( (ControlHandle) m_macControl ) { wxPaintDC dc(this) ; @@ -821,7 +819,6 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) ControlHandle control ; Point localwhere ; SInt16 controlpart ; - WindowRef window = (WindowRef) MacGetRootWindow() ; localwhere.h = x ; localwhere.v = y ; @@ -842,20 +839,7 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) if ( event.m_metaDown ) modifiers |= cmdKey ; -/* -#if TARGET_CARBON - control = FindControlUnderMouse( localwhere , window , &controlpart ) ; -#else - controlpart = FindControl( localwhere , window , &control ) ; -#endif -*/ { - /* - if ( AcceptsFocus() && FindFocus() != this ) - { - SetFocus() ; - } - */ control = (ControlHandle) m_macControl ; if ( control && ::IsControlActive( control ) ) {