X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/edc1cd8baf42910840cd2f86351f417868f9c1a9..dd91da4ed1e9d2ba5d3bc2fae64a8e4ea86b5d41:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index f6fc696ffc..3cfc2853e2 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -264,14 +264,8 @@ wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NUL wxApp::wxApp() { - m_topWindow = NULL; - wxTheApp = this; - m_className = ""; - m_wantDebugOutput = TRUE ; - m_appName = ""; argc = 0; argv = NULL; - m_exitOnFrameDelete = TRUE; m_mainColormap = (WXColormap) NULL; m_appContext = (WXAppContext) NULL; @@ -531,24 +525,24 @@ bool wxApp::SendIdleEvents(wxWindow* win) if (event.MoreRequested()) needMore = TRUE; - wxNode* node = win->GetChildren().First(); + wxWindowList::Node* node = win->GetChildren().GetFirst(); while (node) { - wxWindow* win = (wxWindow*) node->Data(); + wxWindow* win = node->GetData(); if (SendIdleEvents(win)) needMore = TRUE; - node = node->Next(); + node = node->GetNext(); } return needMore ; } void wxApp::DeletePendingObjects() { - wxNode *node = wxPendingDelete.First(); + wxNode *node = wxPendingDelete.GetFirst(); while (node) { - wxObject *obj = (wxObject *)node->Data(); + wxObject *obj = node->GetData(); delete obj; @@ -557,7 +551,7 @@ void wxApp::DeletePendingObjects() // Deleting one object may have deleted other pending // objects, so start from beginning of list again. - node = wxPendingDelete.First(); + node = wxPendingDelete.GetFirst(); } } @@ -572,6 +566,9 @@ static char *fallbackResources[] = { // Create an application context bool wxApp::OnInitGui() { + if( !wxAppBase::OnInitGui() ) + return FALSE; + XtToolkitInitialize() ; wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext(); XtAppSetFallbackResources((XtAppContext) wxTheApp->m_appContext, fallbackResources); @@ -586,6 +583,8 @@ bool wxApp::OnInitGui() argv); if (!dpy) { + // if you don't log to stderr, nothing will be shown... + delete wxLog::SetActiveTarget(new wxLogStderr); wxString className(wxTheApp->GetClassName()); wxLogError(_("wxWindows could not open display for '%s': exiting."), (const char*) className);