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:
parent
6603907dea
commit
6618870d16
@ -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() ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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() ;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user