X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bcdfb2cf30140e4c2b12b69632f5d6929b25662b..cf471cab8277f4cc2c19bce417356badf9e2ca49:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 7ef99770b1..53b01e0f35 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -39,11 +39,17 @@ #include "wx/resource.h" #endif +#ifdef __VMS__ +#pragma message disable nosimpint +#endif #include #include #include #include #include +#ifdef __VMS__ +#pragma message enable nosimpint +#endif #include "wx/motif/private.h" @@ -56,13 +62,23 @@ wxApp *wxTheApp = NULL; wxHashTable *wxWidgetHashTable = NULL; -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) EVT_IDLE(wxApp::OnIdle) END_EVENT_TABLE() -#endif + +#ifdef __WXDEBUG__ + typedef int (*XErrorHandlerFunc)(Display *, XErrorEvent *); + + XErrorHandlerFunc gs_pfnXErrorHandler = 0; + + static int wxXErrorHandler(Display *dpy, XErrorEvent *xevent) + { + // just forward to the default handler for now + return gs_pfnXErrorHandler(dpy, xevent); + } +#endif // __WXDEBUG__ long wxApp::sm_lastMessageTime = 0; @@ -346,7 +362,7 @@ void wxApp::ProcessXEvent(WXEvent* _event) return; } #if 1 - // It seemed before that this hack was redundant and + // It seemed before that this hack was redundant and // key down events were being generated by wxCanvasInputEvent. // But no longer - why ??? // @@ -355,7 +371,7 @@ void wxApp::ProcessXEvent(WXEvent* _event) // We intercepted and processed the key down event return; } -#endif +#endif else { XtDispatchEvent(event); @@ -483,6 +499,13 @@ void wxApp::OnIdle(wxIdleEvent& event) inOnIdle = FALSE; } +void wxWakeUpIdle() +{ + // **** please implement me! **** + // Wake up the idle handler processor, even if it is in another thread... +} + + // Send idle event to all top-level windows bool wxApp::SendIdleEvents() { @@ -564,6 +587,11 @@ bool wxApp::OnInitGui() } m_initialDisplay = (WXDisplay*) dpy; +#ifdef __WXDEBUG__ + // install the X error handler + gs_pfnXErrorHandler = XSetErrorHandler(wxXErrorHandler); +#endif // __WXDEBUG__ + wxTheApp->m_topLevelWidget = (WXWidget) XtAppCreateShell((String)NULL, (const char*) wxTheApp->GetClassName(), applicationShellWidgetClass,dpy, NULL,0) ;