#endif
#include "wx/gdicmn.h"
+#include "wx/app.h"
#include "wx/x11/private.h"
else
{
m_refData = new wxColourRefData();
+
+ M_COLDATA->m_colormap = wxTheApp->GetMainColormap( wxGlobalDisplay() );
+
if (!XParseColor( wxGlobalDisplay(), (Colormap) M_COLDATA->m_colormap, colourName.mb_str(), &M_COLDATA->m_color ))
{
// VZ: asserts are good in general but this one is triggered by
void wxColour::CalcPixel( WXColormap cmap )
{
- if (!Ok()) return;
+ wxCHECK_RET( Ok(), wxT("invalid colour") );
+
+ wxCHECK_RET( cmap, wxT("invalid colormap") );
M_COLDATA->AllocColour( cmap );
}