call GTKUpdateCursor() from SetCursor()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-09-01 21:44:22 +00:00
parent 6ff9dc034d
commit 2f2620215e
2 changed files with 5 additions and 10 deletions

View File

@@ -353,7 +353,7 @@ protected:
// set the current cursor for all GdkWindows making part of this widget // set the current cursor for all GdkWindows making part of this widget
// (see GTKGetWindow) // (see GTKGetWindow)
public: //
// should be called from OnInternalIdle() if it's overridden // should be called from OnInternalIdle() if it's overridden
void GTKUpdateCursor(); void GTKUpdateCursor();

View File

@@ -1730,7 +1730,6 @@ gtk_window_motion_notify_callback( GtkWidget *widget,
{ {
// Rewrite cursor handling here (away from idle). // Rewrite cursor handling here (away from idle).
win->SetCursor( cevent.GetCursor() ); win->SetCursor( cevent.GetCursor() );
win->GTKUpdateCursor();
} }
} }
@@ -1947,7 +1946,6 @@ gtk_window_enter_callback( GtkWidget *widget,
{ {
// Rewrite cursor handling here (away from idle). // Rewrite cursor handling here (away from idle).
win->SetCursor( cevent.GetCursor() ); win->SetCursor( cevent.GetCursor() );
win->GTKUpdateCursor();
} }
} }
@@ -3536,15 +3534,12 @@ void wxWindowGTK::Lower()
bool wxWindowGTK::SetCursor( const wxCursor &cursor ) bool wxWindowGTK::SetCursor( const wxCursor &cursor )
{ {
wxCHECK_MSG( (m_widget != NULL), false, wxT("invalid window") ); if ( !wxWindowBase::SetCursor( cursor.Ok() ? cursor : *wxSTANDARD_CURSOR) )
return false;
if (cursor == m_cursor) GTKUpdateCursor();
return false;
if (g_isIdle) return true;
wxapp_install_idle_handler();
return wxWindowBase::SetCursor( cursor.Ok() ? cursor : *wxSTANDARD_CURSOR );
} }
void wxWindowGTK::GTKUpdateCursor() void wxWindowGTK::GTKUpdateCursor()