+static void InternalIdle(const wxWindowList& list, GdkDisplay*& display)
+{
+ wxWindowList::const_iterator i = list.begin();
+ for (size_t n = list.size(); n--; ++i)
+ {
+ wxWindow* win = *i;
+ if (display == NULL && win->m_widget && win->m_widget->window)
+ display = gdk_drawable_get_display(win->m_widget->window);
+ win->OnInternalIdle();
+ InternalIdle(win->GetChildren(), display);
+ }
+}
+