X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/039bec17f4219d52089405a485a734a6aab23123..02c6eadbc854eb841b75a57ec28f916abe381d03:/src/os2/app.cpp diff --git a/src/os2/app.cpp b/src/os2/app.cpp index 392bb8489d..26611eed61 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -93,12 +93,6 @@ HICON wxDEFAULT_MDIPARENTFRAME_ICON = (HICON) NULL; HBRUSH wxDisableButtonBrush = (HBRUSH) 0; -MRESULT EXPENTRY wxWndProc( HWND - ,ULONG - ,MPARAM - ,MPARAM - ); - // =========================================================================== // implementation // =========================================================================== @@ -386,6 +380,10 @@ void wxApp::CleanUp() wxClassInfo::CleanUpClasses(); + // Delete Message queue + if (wxTheApp->m_hMq) + ::WinDestroyMsgQueue(wxTheApp->m_hMq); + delete wxTheApp; wxTheApp = NULL; @@ -522,6 +520,7 @@ wxApp::wxApp() m_nPrintMode = wxPRINT_WINDOWS; m_exitOnFrameDelete = TRUE; m_bAuto3D = TRUE; + m_hMq = 0; } // end of wxApp::wxApp wxApp::~wxApp() @@ -554,8 +553,9 @@ bool wxApp::Initialized() // bool wxApp::DoMessage() { - BOOL bRc = ::WinGetMsg(vHabmain, &m_vMsg, HWND(NULL), 0, 0); + BOOL bRc = ::WinGetMsg(vHabmain, &svCurrentMsg, HWND(NULL), 0, 0); + wxUsleep(10000); if (bRc == 0) { // got WM_QUIT @@ -624,7 +624,7 @@ bool wxApp::DoMessage() #endif // wxUSE_THREADS // Process the message - if (!ProcessMessage((WXMSG *)&svCurrentMsg) ) + if (!ProcessMessage((WXMSG *)&svCurrentMsg)) { ::WinDispatchMsg(vHabmain, (PQMSG)&svCurrentMsg); } @@ -658,6 +658,7 @@ int wxApp::MainLoop() #endif // wxUSE_THREADS while (!Pending() && ProcessIdle()) { + wxUsleep(10000); } DoMessage(); }