projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Forgot DeleteChildren()
[wxWidgets.git]
/
src
/
os2
/
app.cpp
diff --git
a/src/os2/app.cpp
b/src/os2/app.cpp
index 491f4800c283a66ad760011d2d3f4d77eae1946f..097b323973b9a93d52f664dcf8b53490ff05f366 100644
(file)
--- a/
src/os2/app.cpp
+++ b/
src/os2/app.cpp
@@
-28,13
+28,14
@@
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
#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/log.h"
+ #include "wx/module.h"
#endif
#endif
-#include "wx/module.h"
+#include "wx/stdpaths.h"
+#include "wx/filename.h"
+#include "wx/evtloop.h"
#include "wx/os2/private.h"
#include "wx/os2/private.h"
@@
-447,8
+448,6
@@
bool wxApp::OnInitGui()
wxApp::wxApp()
{
wxApp::wxApp()
{
- argc = 0;
- argv = NULL;
m_nPrintMode = wxPRINT_WINDOWS;
m_hMq = 0;
m_maxSocketHandles = 0;
m_nPrintMode = wxPRINT_WINDOWS;
m_hMq = 0;
m_maxSocketHandles = 0;
@@
-458,23
+457,11
@@
wxApp::wxApp()
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;
} // end of wxApp::~wxApp
bool gbInOnIdle = false;
-void wxApp::OnIdle( wxIdleEvent&
rEvent
)
+void wxApp::OnIdle( wxIdleEvent&
WXUNUSED(rEvent)
)
{
//
// Avoid recursion (via ProcessEvent default case)
{
//
// Avoid recursion (via ProcessEvent default case)
@@
-484,8
+471,6
@@
void wxApp::OnIdle( wxIdleEvent& rEvent )
gbInOnIdle = true;
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
#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
@@
-524,9
+509,7
@@
void wxApp::OnQueryEndSession( wxCloseEvent& rEvent )
//
bool wxApp::Yield(bool onlyIfNeeded)
{
//
bool wxApp::Yield(bool onlyIfNeeded)
{
- static bool s_inYield = false;
-
- if ( s_inYield )
+ if ( m_isInsideYield )
{
if ( !onlyIfNeeded )
{
{
if ( !onlyIfNeeded )
{
@@
-545,12
+528,13
@@
bool wxApp::Yield(bool onlyIfNeeded)
//
wxLog::Suspend();
//
wxLog::Suspend();
-
s_in
Yield = true;
+
m_isInside
Yield = true;
//
// We want to go back to the main message loop
// if we see a WM_QUIT. (?)
//
//
// 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
while (::WinPeekMsg(vHab, &vMsg, (HWND)NULL, 0, 0, PM_NOREMOVE) && vMsg.msg != WM_QUIT)
{
#if wxUSE_THREADS
@@
-559,6
+543,7
@@
bool wxApp::Yield(bool onlyIfNeeded)
if (!wxTheApp->Dispatch())
break;
}
if (!wxTheApp->Dispatch())
break;
}
+
//
// If they are pending events, we must process them.
//
//
// If they are pending events, we must process them.
//
@@
-566,11
+551,13
@@
bool wxApp::Yield(bool onlyIfNeeded)
wxTheApp->ProcessPendingEvents();
HandleSockets();
wxTheApp->ProcessPendingEvents();
HandleSockets();
+
//
// Let the logs be flashed again
//
wxLog::Resume();
//
// Let the logs be flashed again
//
wxLog::Resume();
- s_inYield = false;
+ m_isInsideYield = false;
+
return true;
} // end of wxYield
return true;
} // end of wxYield