X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ce1a4e1cd7f41e30c0bfd8cbcbecf2f2484153a..bc57786b5554a590c4a8abc9c42584fcc8e0a9eb:/src/mac/carbon/toplevel.cpp diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 714293fc36..111ecb1995 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -442,7 +442,19 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev if ( control == 0 ) currentMouseWindow = (wxWindow*) data ; else + { currentMouseWindow = wxFindControlFromMacControl( control ) ; + if ( currentMouseWindow == NULL && cEvent.GetKind() == kEventMouseMoved ) + { + // for wxToolBar to function we have to send certaint events to it + // instead of its children (wxToolBarTools) + ControlRef parent ; + GetSuperControl(control, &parent ); + wxWindow *wxParent = wxFindControlFromMacControl( parent ) ; + if ( wxParent && wxParent->IsKindOf( CLASSINFO( wxToolBar ) ) ) + currentMouseWindow = wxParent ; + } + } } }