X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/52e52bea12264c6339963bcc79ce7d7a68910603..777fd647dc188519b1d1067dc25b1386ca36d9f3:/src/msw/app.cpp diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 25181c2d11..903493b2f1 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -126,7 +126,6 @@ extern wxChar *wxOsVersion; extern wxList *wxWinHandleList; extern wxList WXDLLEXPORT wxPendingDelete; extern void wxSetKeyboardHook(bool doIt); -extern wxCursor *g_globalCursor; MSG s_currentMsg; wxApp *wxTheApp = NULL; @@ -228,8 +227,6 @@ bool wxApp::Initialize() Ctl3dAutoSubclass(wxhInstance); #endif - g_globalCursor = new wxCursor; - // VZ: these icons are not in wx.rc anyhow (but should they?)! #if 0 wxSTD_FRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_FRAME")); @@ -497,13 +494,6 @@ void wxApp::CleanUp() // wxDefaultResourceTable->ClearTable(); #endif - // Indicate that the cursor can be freed, so that cursor won't be deleted - // by deleting the bitmap list before g_globalCursor goes out of scope - // (double deletion of the cursor). - wxSetCursor(wxNullCursor); - delete g_globalCursor; - g_globalCursor = NULL; - wxDeleteStockObjects(); // Destroy all GDI lists, etc. @@ -1019,9 +1009,7 @@ void wxApp::OnIdle(wxIdleEvent& event) #if wxUSE_LOG // flush the logged messages if any - wxLog *pLog = wxLog::GetActiveTarget(); - if ( pLog != NULL && pLog->HasPendingMessages() ) - pLog->Flush(); + wxLog::FlushActive(); #endif // wxUSE_LOG // Send OnIdle events to all windows @@ -1216,9 +1204,12 @@ void wxExit() // Yield to incoming messages bool wxYield() { + // disable log flushing from here because a call to wxYield() shouldn't + // normally result in message boxes popping up &c + wxLog::Suspend(); + // we don't want to process WM_QUIT from here - it should be processed in // the main event loop in order to stop it - MSG msg; while ( PeekMessage(&msg, (HWND)0, 0, 0, PM_NOREMOVE) && msg.message != WM_QUIT ) @@ -1234,6 +1225,9 @@ bool wxYield() // If they are pending events, we must process them. wxTheApp->ProcessPendingEvents(); + // let the logs be flashed again + wxLog::Resume(); + return TRUE; }