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()
|
bool wxApp::ProcessIdle()
|
||||||
{
|
{
|
||||||
|
wxWindowList::Node* node = wxTopLevelWindows.GetFirst();
|
||||||
|
node = wxTopLevelWindows.GetFirst();
|
||||||
|
while (node)
|
||||||
|
{
|
||||||
|
wxWindow* win = node->GetData();
|
||||||
|
CallInternalIdle( win );
|
||||||
|
|
||||||
|
node = node->GetNext();
|
||||||
|
}
|
||||||
|
|
||||||
wxIdleEvent event;
|
wxIdleEvent event;
|
||||||
event.SetEventObject( this );
|
event.SetEventObject( this );
|
||||||
ProcessEvent( event );
|
ProcessEvent( event );
|
||||||
@@ -487,7 +497,7 @@ bool wxApp::ProcessIdle()
|
|||||||
void wxApp::OnIdle( wxIdleEvent &event )
|
void wxApp::OnIdle( wxIdleEvent &event )
|
||||||
{
|
{
|
||||||
static bool s_inOnIdle = FALSE;
|
static bool s_inOnIdle = FALSE;
|
||||||
|
|
||||||
// Avoid recursion (via ProcessEvent default case)
|
// Avoid recursion (via ProcessEvent default case)
|
||||||
if (s_inOnIdle)
|
if (s_inOnIdle)
|
||||||
return;
|
return;
|
||||||
@@ -524,14 +534,6 @@ bool wxApp::SendIdleEvents()
|
|||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
node = wxTopLevelWindows.GetFirst();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxWindow* win = node->GetData();
|
|
||||||
CallInternalIdle( win );
|
|
||||||
|
|
||||||
node = node->GetNext();
|
|
||||||
}
|
|
||||||
return needMore;
|
return needMore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,8 +30,6 @@ extern void wxapp_install_idle_handler();
|
|||||||
extern bool g_isIdle;
|
extern bool g_isIdle;
|
||||||
extern int g_openDialogs;
|
extern int g_openDialogs;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxDialog
|
// wxDialog
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -477,6 +477,16 @@ GdkVisual *wxApp::GetGdkVisual()
|
|||||||
|
|
||||||
bool wxApp::ProcessIdle()
|
bool wxApp::ProcessIdle()
|
||||||
{
|
{
|
||||||
|
wxWindowList::Node* node = wxTopLevelWindows.GetFirst();
|
||||||
|
node = wxTopLevelWindows.GetFirst();
|
||||||
|
while (node)
|
||||||
|
{
|
||||||
|
wxWindow* win = node->GetData();
|
||||||
|
CallInternalIdle( win );
|
||||||
|
|
||||||
|
node = node->GetNext();
|
||||||
|
}
|
||||||
|
|
||||||
wxIdleEvent event;
|
wxIdleEvent event;
|
||||||
event.SetEventObject( this );
|
event.SetEventObject( this );
|
||||||
ProcessEvent( event );
|
ProcessEvent( event );
|
||||||
@@ -487,7 +497,7 @@ bool wxApp::ProcessIdle()
|
|||||||
void wxApp::OnIdle( wxIdleEvent &event )
|
void wxApp::OnIdle( wxIdleEvent &event )
|
||||||
{
|
{
|
||||||
static bool s_inOnIdle = FALSE;
|
static bool s_inOnIdle = FALSE;
|
||||||
|
|
||||||
// Avoid recursion (via ProcessEvent default case)
|
// Avoid recursion (via ProcessEvent default case)
|
||||||
if (s_inOnIdle)
|
if (s_inOnIdle)
|
||||||
return;
|
return;
|
||||||
@@ -524,14 +534,6 @@ bool wxApp::SendIdleEvents()
|
|||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
node = wxTopLevelWindows.GetFirst();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxWindow* win = node->GetData();
|
|
||||||
CallInternalIdle( win );
|
|
||||||
|
|
||||||
node = node->GetNext();
|
|
||||||
}
|
|
||||||
return needMore;
|
return needMore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,8 +30,6 @@ extern void wxapp_install_idle_handler();
|
|||||||
extern bool g_isIdle;
|
extern bool g_isIdle;
|
||||||
extern int g_openDialogs;
|
extern int g_openDialogs;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxDialog
|
// wxDialog
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user