X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af111fc33841cc8bdc4d6cf027702805333bdd2a..0e300ddd7d91d46e3d9fcbbefe916b0fda6fcbbc:/src/motif/dialog.cpp diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index ce3076da35..7e8aaf5637 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -13,12 +13,22 @@ #pragma implementation "dialog.h" #endif +#ifdef __VMS +#define XtDisplay XTDISPLAY +#define XtWindow XTWINDOW +#define XtParent XTPARENT +#define XtScreen XTSCREEN +#endif + #include "wx/dialog.h" #include "wx/utils.h" #include "wx/frame.h" #include "wx/app.h" #include "wx/settings.h" +#ifdef __VMS__ +#pragma message disable nosimpint +#endif #include #include @@ -38,6 +48,9 @@ #if XmVersion > 1000 #include #endif +#ifdef __VMS__ +#pragma message enable nosimpint +#endif #include "wx/motif/private.h" @@ -62,7 +75,6 @@ extern wxList wxPendingDelete; #define wxUSE_INVISIBLE_RESIZE 1 -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxPanel) BEGIN_EVENT_TABLE(wxDialog, wxPanel) @@ -75,7 +87,6 @@ BEGIN_EVENT_TABLE(wxDialog, wxPanel) EVT_CLOSE(wxDialog::OnCloseWindow) END_EVENT_TABLE() -#endif wxDialog::wxDialog() { @@ -495,6 +506,20 @@ int wxDialog::ShowModal() XtAppNextEvent((XtAppContext) wxTheApp->GetAppContext(), &event); wxTheApp->ProcessXEvent((WXEvent*) &event); + + if (XtAppPending( (XtAppContext) wxTheApp->GetAppContext() ) == 0) + { + if (!wxTheApp->ProcessIdle()) + { +#if wxUSE_THREADS + // leave the main loop to give other threads a chance to + // perform their GUI work + wxMutexGuiLeave(); + wxUsleep(20); + wxMutexGuiEnter(); +#endif + } + } } // Remove modal dialog flag from stack