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
}
wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win)
}
wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win)
- : wxEvent(wxEVT_CREATE)
+ SetEventType(wxEVT_CREATE);
SetEventObject(win);
}
wxWindowDestroyEvent::wxWindowDestroyEvent(wxWindow *win)
SetEventObject(win);
}
wxWindowDestroyEvent::wxWindowDestroyEvent(wxWindow *win)
- : wxEvent(wxEVT_DESTROY)
+ SetEventType(wxEVT_DESTROY);
// 2) Add this event handler to list of event handlers that
// have pending events.
// 2) Add this event handler to list of event handlers that
// have pending events.
wxENTER_CRIT_SECT(*wxPendingEventsLocker);
if ( !wxPendingEvents )
wxENTER_CRIT_SECT(*wxPendingEventsLocker);
if ( !wxPendingEvents )
// 3) Inform the system that new pending events are somwehere,
// and that these should be processed in idle time.
// 3) Inform the system that new pending events are somwehere,
// and that these should be processed in idle time.
wxWakeUpIdle();
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
wxWakeUpIdle();
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
{
wxEvent *event = (wxEvent *)node->Data();
delete node;
{
wxEvent *event = (wxEvent *)node->Data();
delete node;
// In ProcessEvent, new events might get added and
// we can safely leave the crtical section here.
#if defined(__VISAGECPP__)
// In ProcessEvent, new events might get added and
// we can safely leave the crtical section here.
#if defined(__VISAGECPP__)
#else
wxENTER_CRIT_SECT( *m_eventsLocker);
#endif
#else
wxENTER_CRIT_SECT( *m_eventsLocker);
#endif
node = m_pendingEvents->First();
}
node = m_pendingEvents->First();
}
#if defined(__VISAGECPP__)
wxLEAVE_CRIT_SECT( m_eventsLocker);
#else
#if defined(__VISAGECPP__)
wxLEAVE_CRIT_SECT( m_eventsLocker);
#else
{
if (!m_dynamicEvents)
return FALSE;
{
if (!m_dynamicEvents)
return FALSE;
wxNode *node = m_dynamicEvents->First();
while (node)
{
wxNode *node = m_dynamicEvents->First();
while (node)
{