diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 61b722b708..5100ef3060 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -477,6 +477,16 @@ GdkVisual *wxApp::GetGdkVisual() bool wxApp::ProcessIdle() { + wxWindowList::Node* node = wxTopLevelWindows.GetFirst(); + node = wxTopLevelWindows.GetFirst(); + while (node) + { + wxWindow* win = node->GetData(); + CallInternalIdle( win ); + + node = node->GetNext(); + } + wxIdleEvent event; event.SetEventObject( this ); ProcessEvent( event ); @@ -487,7 +497,7 @@ bool wxApp::ProcessIdle() void wxApp::OnIdle( wxIdleEvent &event ) { static bool s_inOnIdle = FALSE; - + // Avoid recursion (via ProcessEvent default case) if (s_inOnIdle) return; @@ -524,14 +534,6 @@ bool wxApp::SendIdleEvents() node = node->GetNext(); } - node = wxTopLevelWindows.GetFirst(); - while (node) - { - wxWindow* win = node->GetData(); - CallInternalIdle( win ); - - node = node->GetNext(); - } return needMore; } diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 68a991a371..474b60b633 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -30,8 +30,6 @@ extern void wxapp_install_idle_handler(); extern bool g_isIdle; extern int g_openDialogs; - - //----------------------------------------------------------------------------- // wxDialog //----------------------------------------------------------------------------- diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 61b722b708..5100ef3060 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -477,6 +477,16 @@ GdkVisual *wxApp::GetGdkVisual() bool wxApp::ProcessIdle() { + wxWindowList::Node* node = wxTopLevelWindows.GetFirst(); + node = wxTopLevelWindows.GetFirst(); + while (node) + { + wxWindow* win = node->GetData(); + CallInternalIdle( win ); + + node = node->GetNext(); + } + wxIdleEvent event; event.SetEventObject( this ); ProcessEvent( event ); @@ -487,7 +497,7 @@ bool wxApp::ProcessIdle() void wxApp::OnIdle( wxIdleEvent &event ) { static bool s_inOnIdle = FALSE; - + // Avoid recursion (via ProcessEvent default case) if (s_inOnIdle) return; @@ -524,14 +534,6 @@ bool wxApp::SendIdleEvents() node = node->GetNext(); } - node = wxTopLevelWindows.GetFirst(); - while (node) - { - wxWindow* win = node->GetData(); - CallInternalIdle( win ); - - node = node->GetNext(); - } return needMore; } diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 68a991a371..474b60b633 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -30,8 +30,6 @@ extern void wxapp_install_idle_handler(); extern bool g_isIdle; extern int g_openDialogs; - - //----------------------------------------------------------------------------- // wxDialog //-----------------------------------------------------------------------------