(bad) fix for asserts and OnIdle events

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-26 18:40:25 +00:00
parent c0f8674c79
commit 6d477bb459
2 changed files with 14 additions and 12 deletions

View File

@@ -198,12 +198,12 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
return TRUE; return TRUE;
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
// don't generate the idle events while the assert modal dialog is shown,
// this completely confuses the apps which don't expect to be reentered
// from some safely-looking functions
if ( wxTheApp->IsInAssert() ) if ( wxTheApp->IsInAssert() )
{ {
// don't generate the idle events while the assert modal dialog is return TRUE;
// shown, this completely confuses the apps which don't expect to be
// reentered from some safely-looking functions
return FALSE;
} }
#endif // __WXDEBUG__ #endif // __WXDEBUG__
@@ -220,8 +220,9 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
g_isIdle = TRUE; g_isIdle = TRUE;
wxTheApp->m_idleTag = 0; wxTheApp->m_idleTag = 0;
// Sent idle event to all who request them // Sent idle event to all who request them as long as they do
while (wxTheApp->ProcessIdle()) { } while (wxTheApp->ProcessIdle())
;
// Release lock again // Release lock again
gdk_threads_leave(); gdk_threads_leave();

View File

@@ -198,12 +198,12 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
return TRUE; return TRUE;
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
// don't generate the idle events while the assert modal dialog is shown,
// this completely confuses the apps which don't expect to be reentered
// from some safely-looking functions
if ( wxTheApp->IsInAssert() ) if ( wxTheApp->IsInAssert() )
{ {
// don't generate the idle events while the assert modal dialog is return TRUE;
// shown, this completely confuses the apps which don't expect to be
// reentered from some safely-looking functions
return FALSE;
} }
#endif // __WXDEBUG__ #endif // __WXDEBUG__
@@ -220,8 +220,9 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
g_isIdle = TRUE; g_isIdle = TRUE;
wxTheApp->m_idleTag = 0; wxTheApp->m_idleTag = 0;
// Sent idle event to all who request them // Sent idle event to all who request them as long as they do
while (wxTheApp->ProcessIdle()) { } while (wxTheApp->ProcessIdle())
;
// Release lock again // Release lock again
gdk_threads_leave(); gdk_threads_leave();