]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/app.cpp
fix focus problems in picker controls under MSW which were due to not letting the...
[wxWidgets.git] / src / os2 / app.cpp
index fe9f2d83d0be40e03912979e2b0baed7a7047844..f896e02201dedc9c7206ad9653e097680f38067e 100644 (file)
     #include "wx/dialog.h"
     #include "wx/msgdlg.h"
     #include "wx/intl.h"
-    #include "wx/wxchar.h"
-    #include "wx/stdpaths.h"
-    #include "wx/filename.h"
+    #include "wx/crt.h"
     #include "wx/log.h"
+    #include "wx/module.h"
 #endif
 
-#include "wx/module.h"
+#include "wx/stdpaths.h"
+#include "wx/filename.h"
+#include "wx/evtloop.h"
 
 #include "wx/os2/private.h"
 
@@ -81,8 +82,7 @@ extern "C" int _System bsdselect(int,
 // global variables
 // ---------------------------------------------------------------------------
 
-extern wxChar*                      wxBuffer;
-extern wxList WXDLLEXPORT           wxPendingDelete;
+WXDLLEXPORT_DATA(wxChar*) wxBuffer;
 extern wxCursor*                    g_globalCursor;
 
 HAB                                 vHabmain = NULLHANDLE;
@@ -448,8 +448,6 @@ bool wxApp::OnInitGui()
 
 wxApp::wxApp()
 {
-    argc = 0;
-    argv = NULL;
     m_nPrintMode = wxPRINT_WINDOWS;
     m_hMq = 0;
     m_maxSocketHandles = 0;
@@ -459,23 +457,11 @@ wxApp::wxApp()
 
 wxApp::~wxApp()
 {
-    //
-    // Delete command-line args
-    //
-#if wxUSE_UNICODE
-    int                             i;
-
-    for (i = 0; i < argc; i++)
-    {
-        delete[] argv[i];
-    }
-    delete[] argv;
-#endif
 } // end of wxApp::~wxApp
 
 bool gbInOnIdle = false;
 
-void wxApp::OnIdle( wxIdleEvent& rEvent )
+void wxApp::OnIdle( wxIdleEvent& WXUNUSED(rEvent) )
 {
     //
     // Avoid recursion (via ProcessEvent default case)
@@ -485,8 +471,6 @@ void wxApp::OnIdle( wxIdleEvent& rEvent )
 
     gbInOnIdle = true;
 
-    wxAppBase::OnIdle(rEvent);
-
 #if wxUSE_DC_CACHEING
     // automated DC cache management: clear the cached DCs and bitmap
     // if it's likely that the app has finished with them, that is, we
@@ -552,6 +536,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
     // We want to go back to the main message loop
     // if we see a WM_QUIT. (?)
     //
+    wxEventLoopGuarantor dummyLoopIfNeeded;
     while (::WinPeekMsg(vHab, &vMsg, (HWND)NULL, 0, 0, PM_NOREMOVE) && vMsg.msg != WM_QUIT)
     {
 #if wxUSE_THREADS