extern wxList *wxWinHandleList;
extern wxList WXDLLEXPORT wxPendingDelete;
#if wxUSE_THREADS
-extern wxList wxPendingEvents;
-extern wxCriticalSection wxPendingEventsLocker;
+extern wxList *wxPendingEvents;
+extern wxCriticalSection *wxPendingEventsLocker;
#endif
extern void wxSetKeyboardHook(bool doIt);
extern wxCursor *g_globalCursor;
wxGetResource("wxWindows", "OsVersion", &wxOsVersion);
#endif
+ // I'm annoyed ... I don't know where to put this and I don't want to create // a module for that as it's part of the core.
+#if wxUSE_THREADS
+ wxPendingEvents = new wxList();
+ wxPendingEventsLocker = new wxCriticalSection();
+#endif
+
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
if (wxWinHandleList)
delete wxWinHandleList ;
+ // GL: I'm annoyed ... I don't know where to put this and I don't want to
+ // create a module for that as it's part of the core.
+#if wxUSE_THREADS
+ delete wxPendingEvents;
+ delete wxPendingEventsLocker;
+#endif
+
wxClassInfo::CleanUpClasses();
delete wxTheApp;
#if wxUSE_THREADS
void wxApp::ProcessPendingEvents()
{
- wxNode *node = wxPendingEvents.First();
- wxCriticalSectionLocker locker(wxPendingEventsLocker);
+ wxNode *node = wxPendingEvents->First();
+ wxCriticalSectionLocker locker(*wxPendingEventsLocker);
while (node)
{
handler->ProcessPendingEvents();
delete node;
- node = wxPendingEvents.First();
+ node = wxPendingEvents->First();
}
}
#endif
{
bool needMore = FALSE;
- wxWindowList::Node* node = wxTopLevelWindows.First();
+ wxWindowList::Node* node = wxTopLevelWindows.GetFirst();
while (node)
{
wxWindow* win = node->GetData();