don't crash when XIM is used under IRIX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c8a448977c
commit
0b6d76bfd4
@ -247,8 +247,20 @@ bool wxApp::OnInitGui()
|
|||||||
wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext();
|
wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext();
|
||||||
XtAppSetFallbackResources((XtAppContext) wxTheApp->m_appContext, fallbackResources);
|
XtAppSetFallbackResources((XtAppContext) wxTheApp->m_appContext, fallbackResources);
|
||||||
|
|
||||||
Display *dpy = XtOpenDisplay((XtAppContext) wxTheApp->m_appContext,(String)NULL,NULL,
|
// we shouldn't pass empty application/class name as it results in
|
||||||
wxTheApp->GetClassName().c_str(), NULL, 0,
|
// 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
|
# if XtSpecificationRelease < 5
|
||||||
(Cardinal*) &argc,
|
(Cardinal*) &argc,
|
||||||
# else
|
# else
|
||||||
|
Loading…
Reference in New Issue
Block a user