]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toplevel.cpp
reintroducing direct access, clipping to client area in dc
[wxWidgets.git] / src / mac / carbon / toplevel.cpp
index 1fbb44d100ce2dffced576fff61a249b5bb87fcc..fac851267e03578afc61cb285e52b68c93bc09b2 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "toplevel.h"
 #endif
 
@@ -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
                 }
             }
         }