X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..da599db2401d3659aa09a575e9cd370d23ac7653:/src/gtk/colour.cpp diff --git a/src/gtk/colour.cpp b/src/gtk/colour.cpp index 1d004de25f..60e62c4b3a 100644 --- a/src/gtk/colour.cpp +++ b/src/gtk/colour.cpp @@ -15,6 +15,7 @@ #include "wx/gdicmn.h" #include +#include #include //----------------------------------------------------------------------------- @@ -180,9 +181,14 @@ void wxColour::CalcPixel( GdkColormap *cmap ) M_COLDATA->FreeColour(); +#ifdef __WXGTK20__ + if ((cmap->visual->type == GDK_VISUAL_GRAYSCALE) || + (cmap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) +#else GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap; if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) +#endif { GdkColor *colors = cmap->colors; int max = 3 * (65536);