added wxEventLoop::GetActive()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -146,6 +146,8 @@ bool wxEventLoopImpl::SendIdleMessage()
|
||||
// wxEventLoop implementation
|
||||
// ============================================================================
|
||||
|
||||
wxEventLoop *wxEventLoop::ms_activeLoop = NULL;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxEventLoop running and exiting
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -166,6 +168,9 @@ int wxEventLoop::Run()
|
||||
wxCHECK_MSG( !IsRunning(), -1, _T("can't reenter a message loop") );
|
||||
|
||||
m_impl = new wxEventLoopImpl;
|
||||
|
||||
wxEventLoop *oldLoop = ms_activeLoop;
|
||||
ms_activeLoop = this;
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
@@ -191,6 +196,8 @@ int wxEventLoop::Run()
|
||||
delete m_impl;
|
||||
m_impl = NULL;
|
||||
|
||||
ms_activeLoop = oldLoop;
|
||||
|
||||
return exitcode;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user