- return TRUE;
-}
-
-GdkVisual *wxApp::GetGdkVisual()
-{
- GdkVisual *visual = NULL;
-
- if (m_glVisualInfo)
- visual = gdkx_visual_get( ((XVisualInfo *) m_glVisualInfo)->visualid );
- else
- visual = gdk_window_get_visual( wxGetRootWindow()->window );
-
- wxASSERT( visual );
-
- return visual;
-}
-
-bool wxApp::ProcessIdle()
-{
- wxIdleEvent event;
- event.SetEventObject( this );
- ProcessEvent( event );
-
- return event.MoreRequested();
-}
-
-void wxApp::OnIdle( wxIdleEvent &event )
-{
- static bool s_inOnIdle = FALSE;
-
- // Avoid recursion (via ProcessEvent default case)
- if (s_inOnIdle)
- return;
-
- s_inOnIdle = TRUE;
-
- // Resend in the main thread events which have been prepared in other
- // threads
- ProcessPendingEvents();
-
- // 'Garbage' collection of windows deleted with Close()
- DeletePendingObjects();
-
- // Send OnIdle events to all windows
- bool needMore = SendIdleEvents();
-
- if (needMore)
- event.RequestMore(TRUE);
-
- s_inOnIdle = FALSE;
-}
-
-bool wxApp::SendIdleEvents()
-{
- bool needMore = FALSE;
-
- wxWindowList::Node* node = wxTopLevelWindows.GetFirst();
- while (node)
- {
- wxWindow* win = node->GetData();
- if (SendIdleEvents(win))
- needMore = TRUE;
- node = node->GetNext();
- }
-
- return needMore;
-}
-
-bool wxApp::SendIdleEvents( wxWindow* win )
-{
- bool needMore = FALSE;
-
- wxIdleEvent event;
- event.SetEventObject(win);
-
- win->GetEventHandler()->ProcessEvent(event);
-
- win->OnInternalIdle();
-
- if (event.MoreRequested())
- needMore = TRUE;
-
- wxNode* node = win->GetChildren().First();
- while (node)