]> git.saurik.com Git - wxWidgets.git/commitdiff
Added a couple of fixes.
authorStefan Neis <Stefan.Neis@t-online.de>
Sat, 18 Mar 2000 22:28:28 +0000 (22:28 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sat, 18 Mar 2000 22:28:28 +0000 (22:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/os2/app.h
src/os2/app.cpp
src/os2/utils.cpp

index 1a202d9937329abf6c244e59fe17a0f21d96c61f..8aa43dda8c78b47d9fc4af2f0f5303cdfacdf2eb 100644 (file)
@@ -99,7 +99,6 @@ protected:
     DECLARE_EVENT_TABLE()
 private:
     HMQ                             m_hMq;
-    QMSG                            m_vMsg;
 };
 
 int WXDLLEXPORT wxEntry( int argc, char *argv[] );
index 392bb8489d87c0669100da3f98cf273dfd370878..961f2f9b16ccf1c2be149a544c202dd99d9b76af 100644 (file)
@@ -386,6 +386,10 @@ void wxApp::CleanUp()
 
     wxClassInfo::CleanUpClasses();
 
+    // Delete Message queue
+    if (wxTheApp->m_hMq)
+        ::WinDestroyMsgQueue(wxTheApp->m_hMq);
+
     delete wxTheApp;
     wxTheApp = NULL;
 
@@ -522,6 +526,7 @@ wxApp::wxApp()
     m_nPrintMode = wxPRINT_WINDOWS;
     m_exitOnFrameDelete = TRUE;
     m_bAuto3D = TRUE;
+    m_hMq = 0;
 } // end of wxApp::wxApp
 
 wxApp::~wxApp()
@@ -554,8 +559,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 +630,7 @@ bool wxApp::DoMessage()
 #endif // wxUSE_THREADS
 
         // Process the message
-        if (!ProcessMessage((WXMSG *)&svCurrentMsg) )
+        if (!ProcessMessage((WXMSG *)&svCurrentMsg))
         {
             ::WinDispatchMsg(vHabmain, (PQMSG)&svCurrentMsg);
         }
@@ -658,6 +664,7 @@ int wxApp::MainLoop()
 #endif // wxUSE_THREADS
         while (!Pending() && ProcessIdle())
         {
+         wxUsleep(10000);
         }
         DoMessage();
     }
index ec490fca949cb2d3d3972536eb52e7d7e4c6b06e..31b8f70da6848a159c941c22834400b6e1eb02d4 100644 (file)
 #include <errno.h>
 #include <stdarg.h>
 
-#define INCL_DOS
-#define INCL_PM
-#define INCL_GPI
-#include <os2.h>
 #define PURE_32
+
 #ifndef __EMX__
 #include <upm.h>
 #include <netcons.h>
@@ -236,7 +233,7 @@ void wxUsleep(
   unsigned long                     ulMilliseconds
 )
 {
-    ::DosSleep(ulMilliseconds);
+    ::DosSleep(ulMilliseconds/1000l);
 }
 
 void wxSleep(