X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ebb7606e7d7fb9c4fad75065a97825b1df278d04..a811affe70feeb727bf7fbd2748a48ded6ec3b9b:/src/mac/control.cpp?ds=sidebyside diff --git a/src/mac/control.cpp b/src/mac/control.cpp index 9e6e919791..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) ; @@ -819,7 +819,6 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) ControlHandle control ; Point localwhere ; SInt16 controlpart ; - WindowRef window = (WindowRef) MacGetRootWindow() ; localwhere.h = x ; localwhere.v = y ; @@ -840,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 ) ) {