]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/msgdlg.cpp
update frm Ivan Masar
[wxWidgets.git] / src / motif / msgdlg.cpp
index aa820bafc490fa1107ff3b473d4e3799130d3330..f103cfc0d15bc3e7c95a285485082575bd3087b8 100644 (file)
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
     #include "wx/app.h"
+    #include "wx/settings.h"
 #endif
 
 #include "wx/motif/private.h"
-#include "wx/settings.h"
 
 // ----------------------------------------------------------------------------
 // macros
@@ -167,12 +167,15 @@ int wxMessageDialog::ShowModal()
 
     Display* dpy = XtDisplay(wParent);
 
-    wxComputeColours (dpy, & m_backgroundColour, (wxColour*) NULL);
+    if (m_backgroundColour.Ok())
+    {
+        wxComputeColours (dpy, & m_backgroundColour, (wxColour*) NULL);
 
-    XtSetArg(args[ac], XmNbackground, g_itemColors[wxBACK_INDEX].pixel); ac++;
-    XtSetArg(args[ac], XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel); ac++;
-    XtSetArg(args[ac], XmNbottomShadowColor, g_itemColors[wxBOTS_INDEX].pixel); ac++;
-    XtSetArg(args[ac], XmNforeground, g_itemColors[wxFORE_INDEX].pixel); ac++;
+        XtSetArg(args[ac], XmNbackground, g_itemColors[wxBACK_INDEX].pixel); ac++;
+        XtSetArg(args[ac], XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel); ac++;
+        XtSetArg(args[ac], XmNbottomShadowColor, g_itemColors[wxBOTS_INDEX].pixel); ac++;
+        XtSetArg(args[ac], XmNforeground, g_itemColors[wxFORE_INDEX].pixel); ac++;
+    }
 
     wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);