Fixed wxWindowCreateEvent and wxWindowDestroyEvent to set m_eventType
so the events can actually be caught by a handler. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -524,14 +524,16 @@ void wxQueryNewPaletteEvent::CopyObject(wxObject& obj_d) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win)
|
wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win)
|
||||||
: wxEvent(wxEVT_CREATE)
|
: wxEvent()
|
||||||
{
|
{
|
||||||
|
SetEventType(wxEVT_CREATE);
|
||||||
SetEventObject(win);
|
SetEventObject(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindowDestroyEvent::wxWindowDestroyEvent(wxWindow *win)
|
wxWindowDestroyEvent::wxWindowDestroyEvent(wxWindow *win)
|
||||||
: wxEvent(wxEVT_DESTROY)
|
: wxEvent()
|
||||||
{
|
{
|
||||||
|
SetEventType(wxEVT_DESTROY);
|
||||||
SetEventObject(win);
|
SetEventObject(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,7 +637,7 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
|
|||||||
|
|
||||||
// 2) Add this event handler to list of event handlers that
|
// 2) Add this event handler to list of event handlers that
|
||||||
// have pending events.
|
// have pending events.
|
||||||
|
|
||||||
wxENTER_CRIT_SECT(*wxPendingEventsLocker);
|
wxENTER_CRIT_SECT(*wxPendingEventsLocker);
|
||||||
|
|
||||||
if ( !wxPendingEvents )
|
if ( !wxPendingEvents )
|
||||||
@@ -644,7 +646,7 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
|
|||||||
|
|
||||||
// 3) Inform the system that new pending events are somwehere,
|
// 3) Inform the system that new pending events are somwehere,
|
||||||
// and that these should be processed in idle time.
|
// and that these should be processed in idle time.
|
||||||
|
|
||||||
wxWakeUpIdle();
|
wxWakeUpIdle();
|
||||||
|
|
||||||
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
|
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
|
||||||
@@ -663,7 +665,7 @@ void wxEvtHandler::ProcessPendingEvents()
|
|||||||
{
|
{
|
||||||
wxEvent *event = (wxEvent *)node->Data();
|
wxEvent *event = (wxEvent *)node->Data();
|
||||||
delete node;
|
delete node;
|
||||||
|
|
||||||
// In ProcessEvent, new events might get added and
|
// 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__)
|
#if defined(__VISAGECPP__)
|
||||||
@@ -678,10 +680,10 @@ void wxEvtHandler::ProcessPendingEvents()
|
|||||||
#else
|
#else
|
||||||
wxENTER_CRIT_SECT( *m_eventsLocker);
|
wxENTER_CRIT_SECT( *m_eventsLocker);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
node = m_pendingEvents->First();
|
node = m_pendingEvents->First();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__VISAGECPP__)
|
#if defined(__VISAGECPP__)
|
||||||
wxLEAVE_CRIT_SECT( m_eventsLocker);
|
wxLEAVE_CRIT_SECT( m_eventsLocker);
|
||||||
#else
|
#else
|
||||||
@@ -852,7 +854,7 @@ bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType,
|
|||||||
{
|
{
|
||||||
if (!m_dynamicEvents)
|
if (!m_dynamicEvents)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
wxNode *node = m_dynamicEvents->First();
|
wxNode *node = m_dynamicEvents->First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user