X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b93348e82c0906364ef2e020fd1adaaa49f519f..acd32ffcdb319f162633c20e0202db3f8542998a:/src/common/evtloopcmn.cpp diff --git a/src/common/evtloopcmn.cpp b/src/common/evtloopcmn.cpp index 29e2d7c423..863946f59d 100644 --- a/src/common/evtloopcmn.cpp +++ b/src/common/evtloopcmn.cpp @@ -34,6 +34,28 @@ wxEventLoopBase::wxEventLoopBase() m_eventsToProcessInsideYield = wxEVT_CATEGORY_ALL; } +bool wxEventLoopBase::IsMain() const +{ + if (wxTheApp) + return wxTheApp->GetMainLoop() == this; + return false; +} + +/* static */ +void wxEventLoopBase::SetActive(wxEventLoopBase* loop) +{ + ms_activeLoop = loop; + + if (wxTheApp) + wxTheApp->OnEventLoopEnter(loop); +} + +void wxEventLoopBase::OnExit() +{ + if (wxTheApp) + wxTheApp->OnEventLoopExit(this); +} + void wxEventLoopBase::DelayPendingEventHandler(wxEvtHandler* toDelay) { wxENTER_CRIT_SECT(m_handlersWithPendingEventsLocker);