]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/colour.cpp
Doc/distribution script mods
[wxWidgets.git] / src / gtk / colour.cpp
index 1d004de25f1b19ed1cf4392cb24781b01d54467f..60e62c4b3a50aa738c2916584737380e0220d210 100644 (file)
@@ -15,6 +15,7 @@
 #include "wx/gdicmn.h"
 
 #include <gdk/gdk.h>
+#include <gdk/gdkx.h>
 #include <gdk/gdkprivate.h>
 
 //-----------------------------------------------------------------------------
@@ -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);