+void wxWidgetCocoaImpl::cursorUpdate(WX_NSEvent event, WXWidget slf, void *_cmd)
+{
+ if ( !SetupCursor(event) )
+ {
+ wxOSX_EventHandlerPtr superimpl = (wxOSX_EventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
+ superimpl(slf, (SEL)_cmd, event);
+ }
+ }
+
+bool wxWidgetCocoaImpl::SetupCursor(WX_NSEvent event)
+{
+ extern wxCursor gGlobalCursor;
+
+ if ( gGlobalCursor.IsOk() )
+ {
+ gGlobalCursor.MacInstall();
+ return true;
+ }
+ else
+ {
+ wxWindow* cursorTarget = GetWXPeer();
+ wxCoord x,y;
+ SetupCoordinates(x, y, event);
+ wxPoint cursorPoint( x , y ) ;
+
+ while ( cursorTarget && !cursorTarget->MacSetupCursor( cursorPoint ) )
+ {
+ // at least in GTK cursor events are not propagated either ...
+#if 1
+ cursorTarget = NULL;
+#else
+ cursorTarget = cursorTarget->GetParent() ;
+ if ( cursorTarget )
+ cursorPoint += cursorTarget->GetPosition();
+#endif
+ }
+
+ return cursorTarget != NULL;
+ }
+}
+