]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/app.cpp
fix for scrolling in checklistboxes (Win32 only)
[wxWidgets.git] / src / motif / app.cpp
index 97e2911eb03d0b964c5366f9330fed7b3a411cd4..c8b0dff7042fbbadcdae01751589e7caaec6c599 100644 (file)
 #include "wx/module.h"
 #include "wx/memory.h"
 
-#if wxUSE_THREADS
 #include "wx/thread.h"
-#endif
 
 #if wxUSE_WX_RESOURCES
-#include "wx/resource.h"
+    #include "wx/resource.h"
 #endif
 
 #include <Xm/Xm.h>
@@ -56,8 +54,9 @@ wxHashTable *wxWidgetHashTable = NULL;
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
+
 BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
-EVT_IDLE(wxApp::OnIdle)
+    EVT_IDLE(wxApp::OnIdle)
 END_EVENT_TABLE()
 #endif
 
@@ -65,11 +64,7 @@ long wxApp::sm_lastMessageTime = 0;
 
 bool wxApp::Initialize()
 {
-#ifdef __WXMSW__
-    wxBuffer = new char[1500];
-#else
     wxBuffer = new char[BUFSIZ + 512];
-#endif
 
     wxClassInfo::InitializeClasses();
 
@@ -505,14 +500,17 @@ bool wxApp::OnInitGui()
     XtToolkitInitialize() ;
     wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext() ;
     Display *dpy = XtOpenDisplay((XtAppContext) wxTheApp->m_appContext,(String)NULL,NULL,
-        (const char*) wxTheApp->GetClassName(), NULL,
+        (const char*) wxTheApp->GetClassName(), NULL, 0,
 # if XtSpecificationRelease < 5
-        0,(Cardinal*) &argc,argv) ;
+        (Cardinal*) &argc,
 # else
-    0,&argc,argv) ;
+        &argc,
 # endif
+        argv);
+
     if (!dpy) {
-        cerr << "wxWindows could not open display for " << wxTheApp->GetClassName() << ": exiting.\n";
+        wxLogError(_("wxWindows could not open display for '%s': exiting."),
+                   wxTheApp->GetClassName());
         exit(-1);
     }
     m_initialDisplay = (WXDisplay*) dpy;