+ /* it's necessary to call ProcessIdle() to update the frames sizes which
+ might have been changed (it also will update other things set from
+ OnUpdateUI() which is a nice (and desired) side effect) */
+ while (wxTheApp->ProcessIdle()) { }
+
+#if 0
+ for ( wxWindowList::Node *node = wxTopLevelWindows.GetFirst();
+ node;
+ node = node->GetNext() )
+ {
+ wxWindow *win = node->GetData();
+ win->OnInternalIdle();
+ }
+#endif
+
+ if (wxTheApp->m_idleTag)
+ {
+ /* We need to temporarily remove idle callbacks or the loop will
+ never finish. */
+ gtk_idle_remove( wxTheApp->m_idleTag );
+ wxTheApp->m_idleTag = 0;
+
+ while (gtk_events_pending())
+ gtk_main_iteration();
+
+ /* re-add idle handler */
+ wxTheApp->m_idleTag = gtk_idle_add( wxapp_idle_callback, (gpointer) NULL );
+ }
+ else
+ {
+ while (gtk_events_pending())
+ gtk_main_iteration();
+ }
+