X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b137e49318613a59bea5fca42734ec1b0aaf6f7a..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/common/appbase.cpp?ds=sidebyside diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index fa5db01ac9..697aa2dd87 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -25,6 +25,9 @@ #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" @@ -43,10 +46,6 @@ #include // 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 @@ -216,24 +215,6 @@ void wxAppConsole::Exit() exit(-1); } -wxLayoutDirection wxAppConsole::GetLayoutDirection() const -{ -#if wxUSE_INTL - const wxLocale *const locale = wxGetLocale(); - if ( locale ) - { - const wxLanguageInfo *const - info = wxLocale::GetLanguageInfo(locale->GetLanguage()); - - if ( info ) - return info->LayoutDirection; - } -#endif // wxUSE_INTL - - // we don't know - return wxLayout_Default; -} - // ---------------------------------------------------------------------------- // traits stuff // ---------------------------------------------------------------------------- @@ -299,6 +280,15 @@ void wxAppConsole::ProcessPendingEvents() // 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(); @@ -313,6 +303,14 @@ void wxAppConsole::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 );