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 ;
+ }
+ }
}
}