Rationalised OnIdle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -390,7 +390,7 @@ GtkWidget* wxGetRootWindow()
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxApp,wxEvtHandler)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
|
||||
EVT_IDLE(wxApp::OnIdle)
|
||||
EVT_IDLE(wxAppBase::OnIdle)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxApp::wxApp()
|
||||
@@ -534,35 +534,6 @@ GdkVisual *wxApp::GetGdkVisual()
|
||||
return visual;
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
// Now done in ProcessIdle()
|
||||
#if 0
|
||||
// Send OnIdle events to all windows
|
||||
bool needMore = SendIdleEvents();
|
||||
|
||||
if (needMore)
|
||||
event.RequestMore(TRUE);
|
||||
#endif
|
||||
|
||||
s_inOnIdle = FALSE;
|
||||
}
|
||||
|
||||
int wxApp::MainLoop()
|
||||
{
|
||||
gtk_main();
|
||||
|
Reference in New Issue
Block a user