]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/colour.cpp
deselect the current selection when the user clicks outside of any item
[wxWidgets.git] / src / gtk1 / colour.cpp
index 9da84b3052518c6634c2701d498c8783c3e40ba1..c84141bd0a3aa766ac48b5362759d1300de8a74c 100644 (file)
@@ -112,8 +112,9 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
 
     FreeColour();
 
-    if ( (cmap->visual->type == GDK_VISUAL_GRAYSCALE) ||
-         (cmap->visual->type == GDK_VISUAL_PSEUDO_COLOR) )
+    GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap;
+    if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||
+        (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR))
     {
         m_hasPixel = gdk_colormap_alloc_color( cmap, &m_color, FALSE, TRUE );
         int idx = m_color.pixel;