Corrected wxWindow::SetCursor().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-06-20 10:02:18 +00:00
parent c68a7f32c4
commit ddbed9f4d0
2 changed files with 20 additions and 2 deletions

View File

@@ -2935,7 +2935,16 @@ bool wxWindow::SetCursor( const wxCursor &cursor )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
return wxWindowBase::SetCursor( cursor );
if (cursor == m_cursor)
return FALSE;
if (g_isIdle)
wxapp_install_idle_handler();
if (cursor == wxNullCursor)
return wxWindowBase::SetCursor( *wxSTANDARD_CURSOR );
else
return wxWindowBase::SetCursor( cursor );
}
void wxWindow::WarpPointer( int x, int y )

View File

@@ -2935,7 +2935,16 @@ bool wxWindow::SetCursor( const wxCursor &cursor )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
return wxWindowBase::SetCursor( cursor );
if (cursor == m_cursor)
return FALSE;
if (g_isIdle)
wxapp_install_idle_handler();
if (cursor == wxNullCursor)
return wxWindowBase::SetCursor( *wxSTANDARD_CURSOR );
else
return wxWindowBase::SetCursor( cursor );
}
void wxWindow::WarpPointer( int x, int y )