X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9453cf2bd702241fabc417e9dd5cd7422bcd9966..5d6c4365363f84bf587c7f5f916e5830ef8a11e3:/src/mac/control.cpp diff --git a/src/mac/control.cpp b/src/mac/control.cpp index 1d23a5eaae..764da5b8c2 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -40,7 +40,7 @@ BEGIN_EVENT_TABLE(wxControl, wxWindow) END_EVENT_TABLE() #endif -#include +#include "wx/mac/uma.h" // Item members @@ -835,7 +835,8 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) if ( event.m_metaDown ) modifiers |= cmdKey ; - controlpart = FindControl( localwhere , window , &control ) ; +// controlpart = FindControl( localwhere , window , &control ) ; + control = FindControlUnderMouse( localwhere , window , &controlpart ) ; { /* if ( AcceptsFocus() && FindFocus() != this ) @@ -851,7 +852,7 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) else controlpart = UMAHandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ; wxTheApp->s_lastMouseDown = 0 ; - if ( controlpart && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) ) + if ( control && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) ) && (IsKindOf( CLASSINFO( wxScrollBar ) ) ) ) ) // otherwise we will get the event twice { MacHandleControlClick( control , controlpart ) ;