X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7205570233ce8420b71fa5df368054c8953ff0e4..050c9e3c90c58b05d5b3f7384d1556ca9669f13e:/src/mac/carbon/control.cpp?ds=sidebyside diff --git a/src/mac/carbon/control.cpp b/src/mac/carbon/control.cpp index 55aca27152..5c2a5d785d 100644 --- a/src/mac/carbon/control.cpp +++ b/src/mac/carbon/control.cpp @@ -834,13 +834,13 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) if ( event.m_metaDown ) modifiers |= cmdKey ; - +/* #if TARGET_CARBON control = FindControlUnderMouse( localwhere , window , &controlpart ) ; #else -// control = FindControlUnderMouse( localwhere , window , &controlpart ) ; controlpart = FindControl( localwhere , window , &control ) ; #endif +*/ { /* if ( AcceptsFocus() && FindFocus() != this ) @@ -848,18 +848,17 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) SetFocus() ; } */ + control = m_macControl ; if ( control && ::IsControlActive( control ) ) { { - if ( controlpart == kControlIndicatorPart && !UMAHasAppearance() ) - controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) NULL ) ; - else - controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ; + controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ; wxTheApp->s_lastMouseDown = 0 ; - if ( control && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) ) - && (IsKindOf( CLASSINFO( wxScrollBar ) ) ) ) ) // otherwise we will get the event twice + if ( control && controlpart != kControlNoPart && + ! IsKindOf( CLASSINFO( wxScrollBar ) ) + ) // otherwise we will get the event twice for scrollbar { - MacHandleControlClick( control , controlpart ) ; + MacHandleControlClick( control , controlpart ) ; } } }