#endif
#include "wx/app.h"
-#include "wx/utils.h"
-#include "wx/module.h"
-#include "wx/memory.h"
-#include "wx/log.h"
-#include "wx/intl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/hash.h"
+ #include "wx/intl.h"
+ #include "wx/log.h"
+ #include "wx/utils.h"
+ #include "wx/memory.h"
+ #include "wx/font.h"
+#endif
+
#include "wx/evtloop.h"
-#include "wx/hash.h"
#if wxUSE_THREADS
#include "wx/thread.h"
#endif
#ifdef __VMS__
-#pragma message disable nosimpint
+ #pragma message disable nosimpint
#endif
#include <Xm/Xm.h>
#include <X11/Xlib.h>
#include <X11/Xresource.h>
#include <X11/Xatom.h>
#ifdef __VMS__
-#pragma message enable nosimpint
+ #pragma message enable nosimpint
#endif
#include "wx/motif/private.h"
XtPointer ptr);
static WXWidget wxCreateTopLevelWidget( WXDisplay* display );
-extern wxList wxPendingDelete;
extern bool wxAddIdleCallback();
wxHashTable *wxWidgetHashTable = NULL;
wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext();
XtAppSetFallbackResources((XtAppContext) wxTheApp->m_appContext, fallbackResources);
- Display *dpy = XtOpenDisplay((XtAppContext) wxTheApp->m_appContext,(String)NULL,NULL,
- wxTheApp->GetClassName().c_str(), NULL, 0,
+ // 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
{
Widget rTlw = XtVaCreateWidget( "dummy_widget", topLevelShellWidgetClass,
(Widget)wxTheApp->GetTopLevelWidget(),
- NULL, 0 );
+ NULL );
XtSetMappedWhenManaged( rTlw, False );
XtRealizeWidget( rTlw );