///////////////////////////////////////////////////////////////////////////////
-// Name: common/base/appbase.cpp
+// Name: src/common/appbase.cpp
// Purpose: implements wxAppConsole class
// Author: Vadim Zeitlin
// Modified by:
#endif
#ifndef WX_PRECOMP
+ #ifdef __WXMSW__
+ #include "wx/msw/wrapwin.h" // includes windows.h for MessageBox()
+ #endif
+ #include "wx/list.h"
#include "wx/app.h"
#include "wx/intl.h"
- #include "wx/list.h"
#include "wx/log.h"
+ #include "wx/utils.h"
#endif //WX_PRECOMP
-#include "wx/utils.h"
#include "wx/apptrait.h"
#include "wx/cmdline.h"
#include "wx/confbase.h"
#include <signal.h> // for SIGTRAP used by wxTrap()
#endif //Win/Unix
-#if defined(__WXMSW__)
- #include "wx/msw/wrapwin.h" // includes windows.h for MessageBox()
-#endif
-
#if wxUSE_FONTMAP
#include "wx/fontmap.h"
#endif // wxUSE_FONTMAP
if ( !wxPendingEventsLocker )
return;
#endif
-
+
// ensure that we're the only thread to modify the pending events list
wxENTER_CRIT_SECT( *wxPendingEventsLocker );
// iterate until the list becomes empty
wxList::compatibility_iterator node = wxPendingEvents->GetFirst();
+
+ while (node &&
+ ((wxEvtHandler *)node->GetData())->IsEventHandlingInProgress() &&
+ ((wxEvtHandler *)node->GetData())->IsReentranceAllowed() == false)
+ {
+ // skip over event
+ node = node->GetNext();
+ }
+
while (node)
{
wxEvtHandler *handler = (wxEvtHandler *)node->GetData();
// In ProcessPendingEvents(), new handlers might be add
// and we can safely leave the critical section here.
wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
-
+
handler->ProcessPendingEvents();
wxENTER_CRIT_SECT( *wxPendingEventsLocker );
node = wxPendingEvents->GetFirst();
+
+ while (node &&
+ ((wxEvtHandler *)node->GetData())->IsEventHandlingInProgress() &&
+ ((wxEvtHandler *)node->GetData())->IsReentranceAllowed() == false)
+ {
+ // skip over event
+ node = node->GetNext();
+ }
}
wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
}
#endif // __WXDEBUG__
-