git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51438
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxCursor oldCursor = win->GetCursor();
win->SetCursor(cursor);
wxCursor oldCursor = win->GetCursor();
win->SetCursor(cursor);
-#ifdef __WXMSW__
- // wxSetCursor(cursor);
+#ifdef __WXMAC__
+ wxSetCursor(cursor);
win->SetCursor(oldCursor);
win->SetCursor(oldCursor);
+#ifdef __WXMAC__
+ wxSetCursor(wxNullCursor);
+#endif
+
if (m_status)
{
wxPoint pt;
if (m_status)
{
wxPoint pt;
}
// Global cursor setting
}
// Global cursor setting
void wxSetCursor(const wxCursor& cursor)
{
cursor.MacInstall() ;
void wxSetCursor(const wxCursor& cursor)
{
cursor.MacInstall() ;
+ gGlobalCursor = cursor;
wxWindow* cursorTarget = currentMouseWindow ;
wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
wxWindow* cursorTarget = currentMouseWindow ;
wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
- while ( cursorTarget && !cursorTarget->MacSetupCursor( cursorPoint ) )
+ extern wxCursor gGlobalCursor;
+
+ if (!gGlobalCursor.IsOk())
- cursorTarget = cursorTarget->GetParent() ;
- if ( cursorTarget )
- cursorPoint += cursorTarget->GetPosition();
+ while ( cursorTarget && !cursorTarget->MacSetupCursor( cursorPoint ) )
+ {
+ cursorTarget = cursorTarget->GetParent() ;
+ if ( cursorTarget )
+ cursorPoint += cursorTarget->GetPosition();
+ }
{
gMacStoredActiveCursor = gMacCurrentCursor;
cursor->MacInstall();
{
gMacStoredActiveCursor = gMacCurrentCursor;
cursor->MacInstall();
+
+ wxSetCursor(*cursor);
}
//else: nothing to do, already set
}
}
//else: nothing to do, already set
}
{
gMacStoredActiveCursor.MacInstall();
gMacStoredActiveCursor = wxNullCursor;
{
gMacStoredActiveCursor.MacInstall();
gMacStoredActiveCursor = wxNullCursor;
+
+ wxSetCursor(wxNullCursor);