X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/924ef85080e1b257900110f0c3298a8c19acaeab..617eb021db47c64790700e4b3a0e02c90761cda8:/src/common/event.cpp diff --git a/src/common/event.cpp b/src/common/event.cpp index 5a420067a3..eaf9a7eff9 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -205,6 +205,16 @@ wxScrollEvent::wxScrollEvent(wxEventType commandType, { m_extraLong = orient; m_commandInt = pos; + m_isScrolling = TRUE; +} + +void wxScrollEvent::CopyObject(wxObject& obj_d) const +{ + wxScrollEvent *obj = (wxScrollEvent*)&obj_d; + + wxCommandEvent::CopyObject(obj_d); + + obj->m_isScrolling = m_isScrolling; } /* @@ -218,6 +228,7 @@ wxScrollWinEvent::wxScrollWinEvent(wxEventType commandType, m_eventType = commandType; m_extraLong = orient; m_commandInt = pos; + m_isScrolling = TRUE; } void wxScrollWinEvent::CopyObject(wxObject& obj_d) const @@ -228,6 +239,7 @@ void wxScrollWinEvent::CopyObject(wxObject& obj_d) const obj->m_extraLong = m_extraLong; obj->m_commandInt = m_commandInt; + obj->m_isScrolling = m_isScrolling; } /* @@ -524,14 +536,16 @@ void wxQueryNewPaletteEvent::CopyObject(wxObject& obj_d) const } wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win) - : wxEvent(wxEVT_CREATE) + : wxEvent() { + SetEventType(wxEVT_CREATE); SetEventObject(win); } wxWindowDestroyEvent::wxWindowDestroyEvent(wxWindow *win) - : wxEvent(wxEVT_DESTROY) + : wxEvent() { + SetEventType(wxEVT_DESTROY); SetEventObject(win); } @@ -635,19 +649,18 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event) // 2) Add this event handler to list of event handlers that // have pending events. - + wxENTER_CRIT_SECT(*wxPendingEventsLocker); if ( !wxPendingEvents ) wxPendingEvents = new wxList; wxPendingEvents->Append(this); + wxLEAVE_CRIT_SECT(*wxPendingEventsLocker); + // 3) Inform the system that new pending events are somwehere, // and that these should be processed in idle time. - wxWakeUpIdle(); - - wxLEAVE_CRIT_SECT(*wxPendingEventsLocker); } void wxEvtHandler::ProcessPendingEvents() @@ -663,9 +676,9 @@ void wxEvtHandler::ProcessPendingEvents() { wxEvent *event = (wxEvent *)node->Data(); delete node; - + // In ProcessEvent, new events might get added and - // we can safely leave the crtical section here. + // we can safely leave the crtical section here. #if defined(__VISAGECPP__) wxLEAVE_CRIT_SECT( m_eventsLocker); #else @@ -678,10 +691,10 @@ void wxEvtHandler::ProcessPendingEvents() #else wxENTER_CRIT_SECT( *m_eventsLocker); #endif - + node = m_pendingEvents->First(); } - + #if defined(__VISAGECPP__) wxLEAVE_CRIT_SECT( m_eventsLocker); #else @@ -852,7 +865,7 @@ bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType, { if (!m_dynamicEvents) return FALSE; - + wxNode *node = m_dynamicEvents->First(); while (node) {