From: Robin Dunn Date: Sun, 5 Nov 2006 21:22:10 +0000 (+0000) Subject: Revert reentrancy patch (#1573619) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a5bbc2027867925c38024ad1025ac1e04d1bf473 Revert reentrancy patch (#1573619) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/event.h b/include/wx/event.h index 7c55d2c551..538c1be5d4 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -2456,11 +2456,6 @@ public: void SetClientData( void *data ) { DoSetClientData(data); } void *GetClientData() const { return DoGetClientData(); } - // reentrance guard - void AllowReentrance( bool allow = true ) { m_reentranceAllowed = allow; } - bool IsReentranceAllowed() { return m_reentranceAllowed; } - bool IsEventHandlingInProgress() { return m_eventHandlingInProgress; } - // check if the given event table entry matches this event and call the // handler if it does // @@ -2530,9 +2525,6 @@ protected: # endif #endif - bool m_reentranceAllowed; // Reentrance is allowed for this handler? - bool m_eventHandlingInProgress; // Eventhandling is in progress? - // Is event handler enabled? bool m_enabled; diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 697aa2dd87..6f2bbbe5a4 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -280,15 +280,6 @@ void wxAppConsole::ProcessPendingEvents() // iterate until the list becomes empty wxList::compatibility_iterator node = wxPendingEvents->GetFirst(); - - while (node && - ((wxEvtHandler *)node->GetData())->IsEventHandlingInProgress() && - ((wxEvtHandler *)node->GetData())->IsReentranceAllowed() == false) - { - // skip over event - node = node->GetNext(); - } - while (node) { wxEvtHandler *handler = (wxEvtHandler *)node->GetData(); @@ -303,14 +294,6 @@ void wxAppConsole::ProcessPendingEvents() wxENTER_CRIT_SECT( *wxPendingEventsLocker ); node = wxPendingEvents->GetFirst(); - - while (node && - ((wxEvtHandler *)node->GetData())->IsEventHandlingInProgress() && - ((wxEvtHandler *)node->GetData())->IsReentranceAllowed() == false) - { - // skip over event - node = node->GetNext(); - } } wxLEAVE_CRIT_SECT( *wxPendingEventsLocker ); diff --git a/src/common/event.cpp b/src/common/event.cpp index df764235ac..c254930217 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1011,9 +1011,6 @@ wxEvtHandler::wxEvtHandler() m_eventsLocker = new wxCriticalSection; # endif #endif - // reentrace not allowed by default - m_reentranceAllowed = false; - m_eventHandlingInProgress = false; // no client data (yet) m_clientData = NULL; @@ -1140,9 +1137,6 @@ void wxEvtHandler::ProcessPendingEvents() wxCHECK_RET( m_pendingEvents, wxT("Please call wxApp::ProcessPendingEvents() instead") ); - // eventhandling is now in progess - m_eventHandlingInProgress = true; - wxENTER_CRIT_SECT( Lock() ); // we leave the loop once we have processed all events that were present at @@ -1175,9 +1169,6 @@ void wxEvtHandler::ProcessPendingEvents() } wxLEAVE_CRIT_SECT( Lock() ); - - // eventhandling no longer in progess - m_eventHandlingInProgress = false; } /*