fix compilation after the last change in msw/thread.cpp: we can't use wxEventLoop from there; use the hack described at http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/83190 instead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,6 +30,23 @@
|
||||
#include "wx/app.h"
|
||||
#endif //WX_PRECOMP
|
||||
|
||||
// see the comment near the declaration of wxRunningEventLoopCount in
|
||||
// src/msw/thread.cpp for the explanation of this hack
|
||||
#ifdef __WXMSW__
|
||||
|
||||
extern int wxRunningEventLoopCount;
|
||||
struct wxRunningEventLoopCounter
|
||||
{
|
||||
wxRunningEventLoopCounter() { wxRunningEventLoopCount++; }
|
||||
~wxRunningEventLoopCounter() { wxRunningEventLoopCount--; }
|
||||
};
|
||||
|
||||
#else // !__WXMSW__
|
||||
|
||||
struct wxRunningEventLoopCounter { };
|
||||
|
||||
#endif // __WXMSW__/!__WXMSW__
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// globals
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -59,6 +76,8 @@ int wxEventLoopManual::Run()
|
||||
// should undo
|
||||
wxEventLoopActivator activate(wx_static_cast(wxEventLoop *, this));
|
||||
|
||||
wxRunningEventLoopCounter evtLoopCounter;
|
||||
|
||||
// we must ensure that OnExit() is called even if an exception is thrown
|
||||
// from inside Dispatch() but we must call it from Exit() in normal
|
||||
// situations because it is supposed to be called synchronously,
|
||||
|
||||
Reference in New Issue
Block a user