/////////////////////////////////////////////////////////////////////////////
-// Name: event.cpp
+// Name: src/common/event.cpp
// Purpose: Event classes
// Author: Julian Smart
// Modified by:
#endif
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/app.h"
#include "wx/list.h"
#endif
}
+#if WXWIN_COMPATIBILITY_2_6
long wxKeyEvent::KeyCode() const
{
return m_keyCode;
}
+#endif // WXWIN_COMPATIBILITY_2_6
wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win)
{
wxENTER_CRIT_SECT( Lock() );
- if ( !--n )
+ if ( --n == 0 )
break;
}
wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->GetData();
#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
+ // get next node before (maybe) calling the event handler as it could
+ // call Disconnect() invalidating the current node
+ node = node->GetNext();
+
if ((event.GetEventType() == entry->m_eventType) && (entry->m_fn != 0))
{
wxEvtHandler *handler =
return true;
}
}
-
- node = node->GetNext();
}
return false;