X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/338dd992160bf20205743c092b353d96ef7604fb..3dc0174140ffc52a08fd5b64cf839babad09e5cf:/src/motif/dialog.cpp diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index 2b19f81499..19a321cc02 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -13,6 +13,13 @@ #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" @@ -68,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) @@ -81,12 +87,11 @@ BEGIN_EVENT_TABLE(wxDialog, wxPanel) EVT_CLOSE(wxDialog::OnCloseWindow) END_EVENT_TABLE() -#endif wxDialog::wxDialog() { m_modalShowing = FALSE; - m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); + m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); } bool wxDialog::Create(wxWindow *parent, wxWindowID id, @@ -100,7 +105,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, m_modalShowing = FALSE; m_dialogTitle = title; - m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); + m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); m_foregroundColour = *wxBLACK; SetName(name); @@ -146,7 +151,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, XmStringFree(str); } - m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT); + m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); ChangeFont(FALSE); wxAddWindowToTable(dialogShell, this); @@ -501,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 @@ -620,7 +639,7 @@ bool wxDialog::Destroy() void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) { - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); Refresh(); }