X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b6f5f27a330a5f3f05ee4824270e7dc692441d42..80c82e01758cd838aa5c922b848454277b11da26:/src/mac/control.cpp?ds=sidebyside diff --git a/src/mac/control.cpp b/src/mac/control.cpp index 0ef4cd0a87..5998a660fc 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -755,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) ; @@ -767,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) ; @@ -824,7 +819,6 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) ControlHandle control ; Point localwhere ; SInt16 controlpart ; - WindowRef window = (WindowRef) MacGetRootWindow() ; localwhere.h = x ; localwhere.v = y ; @@ -845,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 ) ) {