fixed wxWindow::SetCursor( wxNullCursor) for mac

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2001-05-17 15:53:01 +00:00
parent 6603907dea
commit 6618870d16
2 changed files with 26 additions and 10 deletions

View File

@ -413,11 +413,19 @@ void wxWindow::MacRootWindowToClient( int *x , int *y ) const
bool wxWindow::SetCursor(const wxCursor& cursor)
{
if ( !wxWindowBase::SetCursor(cursor) )
{
// no change
if (m_cursor == cursor)
return FALSE;
}
if (wxNullCursor == cursor)
{
if ( ! wxWindowBase::SetCursor( *wxSTANDARD_CURSOR ) )
return FALSE ;
}
else
{
if ( ! wxWindowBase::SetCursor( cursor ) )
return FALSE ;
}
wxASSERT_MSG( m_cursor.Ok(),
wxT("cursor must be valid after call to the base version"));
@ -432,7 +440,7 @@ bool wxWindow::SetCursor(const wxCursor& cursor)
{
if ( mouseWin == this && !wxIsBusy() )
{
cursor.MacInstall() ;
m_cursor.MacInstall() ;
}
}

View File

@ -413,11 +413,19 @@ void wxWindow::MacRootWindowToClient( int *x , int *y ) const
bool wxWindow::SetCursor(const wxCursor& cursor)
{
if ( !wxWindowBase::SetCursor(cursor) )
{
// no change
if (m_cursor == cursor)
return FALSE;
}
if (wxNullCursor == cursor)
{
if ( ! wxWindowBase::SetCursor( *wxSTANDARD_CURSOR ) )
return FALSE ;
}
else
{
if ( ! wxWindowBase::SetCursor( cursor ) )
return FALSE ;
}
wxASSERT_MSG( m_cursor.Ok(),
wxT("cursor must be valid after call to the base version"));
@ -432,7 +440,7 @@ bool wxWindow::SetCursor(const wxCursor& cursor)
{
if ( mouseWin == this && !wxIsBusy() )
{
cursor.MacInstall() ;
m_cursor.MacInstall() ;
}
}