]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/nonownedwnd.cpp
fix wxDataObjectComposite::GetFormatCount and add some comments to explain the reason...
[wxWidgets.git] / src / osx / carbon / nonownedwnd.cpp
index 67c13fac0bfb8eb0ec26b22344838864c028db56..4587682f13d3f01a2cd5d166c05747908830296f 100644 (file)
@@ -611,9 +611,9 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
                     // instead of its children (wxToolBarTools)
                     ControlRef parent ;
                     GetSuperControl(control, &parent );
-                    wxWindow *wxParent = (wxWindow*) wxFindWindowFromWXWidget((WXWidget) parent ) ;
-                    if ( wxParent && wxParent->IsKindOf( CLASSINFO( wxToolBar ) ) )
-                        currentMouseWindow = wxParent ;
+                    wxWindow *wxparent = (wxWindow*) wxFindWindowFromWXWidget((WXWidget) parent ) ;
+                    if ( wxparent && wxparent->IsKindOf( CLASSINFO( wxToolBar ) ) )
+                        currentMouseWindow = wxparent ;
 #endif
                 }
 #endif
@@ -733,7 +733,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
 
         wxWindow* cursorTarget = currentMouseWindow ;
         wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
-
+        
         extern wxCursor gGlobalCursor;
 
         if (!gGlobalCursor.IsOk())
@@ -749,6 +749,16 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
     }
     else // currentMouseWindow == NULL
     {
+        if (toplevelWindow && !control)
+        {
+           extern wxCursor gGlobalCursor;
+           if (!gGlobalCursor.IsOk())
+           {
+                // update cursor when over toolbar and titlebar etc.
+                wxSTANDARD_CURSOR->MacInstall() ;
+           }
+        }
+    
         // don't mess with controls we don't know about
         // for some reason returning eventNotHandledErr does not lead to the correct behaviour
         // so we try sending them the correct control directly