X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/19a67f39d7615692953f490b9a2d9a9176fdb685..6cab4fcac7fe26d9ae5a1d29066e0893d689bb38:/src/common/appcmn.cpp diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 2df9a21aaf..afb51d63c8 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/common/appcmn.cpp -// Purpose: wxAppConsole and wxAppBase methods common to all platforms +// Purpose: wxAppBase methods common to all platforms // Author: Vadim Zeitlin // Modified by: // Created: 18.10.99 @@ -71,13 +71,15 @@ WXDLLIMPEXP_DATA_CORE(wxList) wxPendingDelete; wxAppBase::wxAppBase() { - m_topWindow = (wxWindow *)NULL; + m_topWindow = NULL; m_useBestVisual = false; m_forceTrueColour = false; m_isActive = true; + m_isInsideYield = false; + // We don't want to exit the app if the user code shows a dialog from its // OnInit() -- but this is what would happen if we set m_exitOnFrameDelete // to Yes initially as this dialog would be the last top level window. @@ -351,11 +353,11 @@ void wxAppBase::DeletePendingObjects() // Returns true if more time is needed. bool wxAppBase::ProcessIdle() { - // process pending wx events before sending idle events - ProcessPendingEvents(); - + // call the base class version first, it will process the pending events + // (which should be done before the idle events generation) and send the + // idle event to wxTheApp itself + bool needMore = wxAppConsoleBase::ProcessIdle(); wxIdleEvent event; - bool needMore = false; wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); while (node) { @@ -365,9 +367,6 @@ bool wxAppBase::ProcessIdle() node = node->GetNext(); } - if (wxAppConsole::ProcessIdle()) - needMore = true; - // 'Garbage' collection of windows deleted with Close(). DeletePendingObjects(); @@ -419,9 +418,7 @@ bool wxAppBase::SendIdleEvents(wxWindow* win, wxIdleEvent& event) wxLog *wxGUIAppTraitsBase::CreateLogTarget() { -// DE: One day I'll remove this but right now the generic dialog used for this -// just doesn't work right at all on wxCocoa. -#if wxUSE_LOGGUI && !defined(__WXCOCOA__) +#if wxUSE_LOGGUI return new wxLogGui; #else // we must have something!