X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4732e2dca973b039b9a7db604a8adf59d99dc1a7..7b0ccb8a603b4f97740acc65d9429bb58f7ba1bd:/src/common/event.cpp diff --git a/src/common/event.cpp b/src/common/event.cpp index 6ba5895089..817f40e4a8 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -183,6 +183,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_COMBOBOX_SELECTED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOOL_RCLICKED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOOL_ENTER) DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPINCTRL_UPDATED) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED) // Mouse event types @@ -1186,7 +1187,17 @@ void wxEvtHandler::ProcessPendingEvents() // if there are no more pending events left, we don't need to stay in this // list if ( m_pendingEvents->IsEmpty() ) + { +#if wxUSE_THREADS + if (wxPendingEventsLocker) + wxENTER_CRIT_SECT(*wxPendingEventsLocker); +#endif wxPendingEvents->DeleteObject(this); +#if wxUSE_THREADS + if (wxPendingEventsLocker) + wxLEAVE_CRIT_SECT(*wxPendingEventsLocker); +#endif + } wxLEAVE_CRIT_SECT( m_pendingEventsLock ); @@ -1376,7 +1387,7 @@ void wxEvtHandler::Connect( int id, int lastId, #if wxUSE_WEAKREF // Make sure we get to know when a sink is destroyed - if ( eventSink ) + if ( eventSink && eventSink != this ) { wxEventConnectionRef *evtConnRef = FindRefInTrackerList(eventSink); if ( evtConnRef ) @@ -1397,7 +1408,7 @@ bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType, #if wxUSE_WEAKREF // Remove connection from tracker node (wxEventConnectionRef) - if ( eventSink ) + if ( eventSink && eventSink != this ) { wxEventConnectionRef *evtConnRef = FindRefInTrackerList(eventSink); if ( evtConnRef )