X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..2ee96a251c9556d4d410a860c211a56834f18c7f:/src/common/event.cpp diff --git a/src/common/event.cpp b/src/common/event.cpp index b00694a646..ec31583f0d 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -236,14 +236,6 @@ DEFINE_EVENT_TYPE(wxEVT_SCROLL_THUMBTRACK) DEFINE_EVENT_TYPE(wxEVT_SCROLL_THUMBRELEASE) DEFINE_EVENT_TYPE(wxEVT_SCROLL_CHANGED) -// see comments in wx/event.h, near wxEVT_SCROLL_ENDSCROLL declaration -#if wxCHECK_VERSION(2, 7, 0) - #error "Remove the lines below, not needed any more" -#endif -#undef wxEVT_SCROLL_ENDSCROLL -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_SCROLL_ENDSCROLL; -const wxEventType wxEVT_SCROLL_ENDSCROLL = wxEVT_SCROLL_CHANGED; - // Scroll events from wxWindow DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_TOP) DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_BOTTOM) @@ -1074,7 +1066,7 @@ void wxEvtHandler::ClearEventLocker() delete m_eventsLocker; m_eventsLocker = NULL; #endif -}; +} #endif // wxUSE_THREADS @@ -1092,7 +1084,10 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event) wxENTER_CRIT_SECT( Lock() ); if ( !m_pendingEvents ) + { m_pendingEvents = new wxList; + m_pendingEvents->DeleteContents(true); + } m_pendingEvents->Append(eventCopy); @@ -1134,15 +1129,14 @@ void wxEvtHandler::ProcessPendingEvents() { wxEvent *event = (wxEvent *)node->GetData(); - m_pendingEvents->Erase(node); - wxLEAVE_CRIT_SECT( Lock() ); ProcessEvent(*event); - delete event; wxENTER_CRIT_SECT( Lock() ); + m_pendingEvents->Erase(node); + if ( !--n ) break; } @@ -1367,7 +1361,7 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event ) } return false; -}; +} void wxEvtHandler::DoSetClientObject( wxClientData *data ) {