]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/app.cpp
New location for some deprecated files
[wxWidgets.git] / src / motif / app.cpp
index b40531cea5e5a8b231248c09e46ee29acca1b3c6..b41e0ebcd8ffce0a928d6ab3de54e8ae04e463dc 100644 (file)
@@ -326,11 +326,14 @@ void wxApp::ExitMainLoop()
 // Is a message/event pending?
 bool wxApp::Pending()
 {
+    return m_eventLoop->Pending();
+#if 0
     XFlush(XtDisplay( (Widget) wxTheApp->GetTopLevelWidget() ));
 
     // Fix by Doug from STI, to prevent a stall if non-X event
     // is found.
     return ((XtAppPending( (XtAppContext) GetAppContext() ) & XtIMXEvent) != 0) ;
+#endif
 }
 
 // Dispatch a message.
@@ -464,7 +467,7 @@ bool wxApp::OnInitGui()
     XtAppSetFallbackResources((XtAppContext) wxTheApp->m_appContext, fallbackResources);
 
     Display *dpy = XtOpenDisplay((XtAppContext) wxTheApp->m_appContext,(String)NULL,NULL,
-        (const char*) wxTheApp->GetClassName(), NULL, 0,
+        wxTheApp->GetClassName().c_str(), NULL, 0,
 # if XtSpecificationRelease < 5
         (Cardinal*) &argc,
 # else
@@ -477,7 +480,7 @@ bool wxApp::OnInitGui()
         delete wxLog::SetActiveTarget(new wxLogStderr);
         wxString className(wxTheApp->GetClassName());
         wxLogError(_("wxWindows could not open display for '%s': exiting."),
-                   (const char*) className);
+                   className.c_str());
         exit(-1);
     }
     m_initialDisplay = (WXDisplay*) dpy;
@@ -487,9 +490,11 @@ bool wxApp::OnInitGui()
     gs_pfnXErrorHandler = XSetErrorHandler(wxXErrorHandler);
 #endif // __WXDEBUG__
 
-    wxTheApp->m_topLevelWidget = (WXWidget) XtAppCreateShell((String)NULL, (const char*) wxTheApp->GetClassName(),
-        applicationShellWidgetClass,dpy,
-        NULL,0) ;
+    wxTheApp->m_topLevelWidget =
+        (WXWidget) XtAppCreateShell((String)NULL,
+                                    wxTheApp->GetClassName().c_str(),
+                                    applicationShellWidgetClass,dpy,
+                                    NULL,0) ;
 
     // Add general resize proc
     XtActionsRec rec;