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:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -30,8 +30,6 @@ extern void wxapp_install_idle_handler();
|
||||
extern bool g_isIdle;
|
||||
extern int g_openDialogs;
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -30,8 +30,6 @@ extern void wxapp_install_idle_handler();
|
||||
extern bool g_isIdle;
|
||||
extern int g_openDialogs;
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user