+ XtSetLanguageProc(NULL, NULL, NULL);
+ XtToolkitInitialize() ;
+ wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext();
+ XtAppSetFallbackResources((XtAppContext) wxTheApp->m_appContext, fallbackResources);
+
+ // we shouldn't pass empty application/class name as it results in
+ // immediate crash inside XOpenIM() (if XIM is used) under IRIX
+ wxString appname = wxTheApp->GetAppName();
+ if ( appname.empty() )
+ appname = _T("wxapp");
+ wxString clsname = wxTheApp->GetClassName();
+ if ( clsname.empty() )
+ clsname = _T("wx");
+
+ Display *dpy = XtOpenDisplay((XtAppContext) wxTheApp->m_appContext,
+ (String)NULL,
+ appname.c_str(),
+ clsname.c_str(),
+ NULL, 0, // no options
+# if XtSpecificationRelease < 5
+ (Cardinal*) &argc,
+# else
+ &argc,
+# endif
+ argv);
+
+ if (!dpy) {
+ // if you don't log to stderr, nothing will be shown...
+ delete wxLog::SetActiveTarget(new wxLogStderr);
+ wxString className(wxTheApp->GetClassName());
+ wxLogError(_("wxWidgets could not open display for '%s': exiting."),
+ className.c_str());
+ exit(-1);
+ }
+ m_initialDisplay = (WXDisplay*) dpy;