Added work-around/fix for redraw bug in idle handler.

I now send internal idle calls whereas normal idle
   events still get block by the recursion block.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-10-04 20:10:14 +00:00
parent af0cf516b0
commit c6de9c117b
4 changed files with 22 additions and 22 deletions

View File

@@ -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;
}

View File

@@ -30,8 +30,6 @@ extern void wxapp_install_idle_handler();
extern bool g_isIdle;
extern int g_openDialogs;
//-----------------------------------------------------------------------------
// wxDialog
//-----------------------------------------------------------------------------

View File

@@ -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;
}

View File

@@ -30,8 +30,6 @@ extern void wxapp_install_idle_handler();
extern bool g_isIdle;
extern int g_openDialogs;
//-----------------------------------------------------------------------------
// wxDialog
//-----------------------------------------------------------------------------