X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d1a4878f36ba4b5f66c2ccfd2cb27a9dc528b6f..8d3b6b8aa1cc0d2f927cedd36d490d412ed3da29:/src/mac/carbon/toplevel.cpp diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index d4f3e31c97..fac851267e 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -36,6 +36,7 @@ #include "wx/log.h" #include "wx/intl.h" #include "wx/settings.h" + #include "wx/control.h" #endif //WX_PRECOMP #include "wx/mac/uma.h" @@ -449,6 +450,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev currentMouseWindow = wxFindControlFromMacControl( control ) ; if ( currentMouseWindow == NULL && cEvent.GetKind() == kEventMouseMoved ) { +#if wxUSE_TOOLBAR // for wxToolBar to function we have to send certaint events to it // instead of its children (wxToolBarTools) ControlRef parent ; @@ -456,6 +458,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev wxWindow *wxParent = wxFindControlFromMacControl( parent ) ; if ( wxParent && wxParent->IsKindOf( CLASSINFO( wxToolBar ) ) ) currentMouseWindow = wxParent ; +#endif } } }