X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4bbd80984989cfededfc805b941b2cacf5424302..982d7f931701e2d65182f798e9182139efd67ed7:/src/os2/app.cpp diff --git a/src/os2/app.cpp b/src/os2/app.cpp index 49d5217b64..e6a8c71e54 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -35,6 +35,7 @@ #include "wx/stdpaths.h" #include "wx/filename.h" +#include "wx/evtloop.h" #include "wx/os2/private.h" @@ -234,9 +235,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv) // Some people may wish to use this, but // probably it shouldn't be here by default. -#ifdef __WXDEBUG__ // wxRedirectIOToConsole(); -#endif wxWinHandleHash = new wxWinHashTable(wxKEY_INTEGER, 100); @@ -503,61 +502,6 @@ void wxApp::OnQueryEndSession( wxCloseEvent& rEvent ) } } // end of wxApp::OnQueryEndSession -// -// Yield to incoming messages -// -bool wxApp::Yield(bool onlyIfNeeded) -{ - static bool s_inYield = false; - - if ( s_inYield ) - { - if ( !onlyIfNeeded ) - { - wxFAIL_MSG( _T("wxYield() called recursively") ); - } - - return false; - } - - HAB vHab = 0; - QMSG vMsg; - - // - // Disable log flushing from here because a call to wxYield() shouldn't - // normally result in message boxes popping up &c - // - wxLog::Suspend(); - - s_inYield = true; - - // - // We want to go back to the main message loop - // if we see a WM_QUIT. (?) - // - while (::WinPeekMsg(vHab, &vMsg, (HWND)NULL, 0, 0, PM_NOREMOVE) && vMsg.msg != WM_QUIT) - { -#if wxUSE_THREADS - wxMutexGuiLeaveOrEnter(); -#endif // wxUSE_THREADS - if (!wxTheApp->Dispatch()) - break; - } - // - // If they are pending events, we must process them. - // - if (wxTheApp) - wxTheApp->ProcessPendingEvents(); - - HandleSockets(); - // - // Let the logs be flashed again - // - wxLog::Resume(); - s_inYield = false; - return true; -} // end of wxYield - int wxApp::AddSocketHandler(int handle, int mask, void (*callback)(void*), void * gsock) {