diff --git a/ChangeLog b/ChangeLog index 0afdaeb2ea..bc8d3c8767 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Sun Dec 8 21:22:46 2002 Owen Taylor + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private): + When allocating non-writeable colors, fill in the flags + field of the XColor, and insert the returned color into + our color hash. (#100023, Naofumi Yasufuku) + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_free_colors): + Fix a typo (my fault) that slipped in in the last patch. + Sun Dec 8 20:32:23 2002 Owen Taylor More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0afdaeb2ea..bc8d3c8767 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Sun Dec 8 21:22:46 2002 Owen Taylor + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private): + When allocating non-writeable colors, fill in the flags + field of the XColor, and insert the returned color into + our color hash. (#100023, Naofumi Yasufuku) + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_free_colors): + Fix a typo (my fault) that slipped in in the last patch. + Sun Dec 8 20:32:23 2002 Owen Taylor More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku) diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 0afdaeb2ea..bc8d3c8767 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +Sun Dec 8 21:22:46 2002 Owen Taylor + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private): + When allocating non-writeable colors, fill in the flags + field of the XColor, and insert the returned color into + our color hash. (#100023, Naofumi Yasufuku) + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_free_colors): + Fix a typo (my fault) that slipped in in the last patch. + Sun Dec 8 20:32:23 2002 Owen Taylor More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku) diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0afdaeb2ea..bc8d3c8767 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +Sun Dec 8 21:22:46 2002 Owen Taylor + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private): + When allocating non-writeable colors, fill in the flags + field of the XColor, and insert the returned color into + our color hash. (#100023, Naofumi Yasufuku) + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_free_colors): + Fix a typo (my fault) that slipped in in the last patch. + Sun Dec 8 20:32:23 2002 Owen Taylor More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku) diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0afdaeb2ea..bc8d3c8767 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Sun Dec 8 21:22:46 2002 Owen Taylor + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private): + When allocating non-writeable colors, fill in the flags + field of the XColor, and insert the returned color into + our color hash. (#100023, Naofumi Yasufuku) + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_free_colors): + Fix a typo (my fault) that slipped in in the last patch. + Sun Dec 8 20:32:23 2002 Owen Taylor More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0afdaeb2ea..bc8d3c8767 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Sun Dec 8 21:22:46 2002 Owen Taylor + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_private): + When allocating non-writeable colors, fill in the flags + field of the XColor, and insert the returned color into + our color hash. (#100023, Naofumi Yasufuku) + + * gdk/x11/gdkcolor-x11.c (gdk_colormap_free_colors): + Fix a typo (my fault) that slipped in in the last patch. + Sun Dec 8 20:32:23 2002 Owen Taylor More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku) diff --git a/gdk/x11/gdkcolor-x11.c b/gdk/x11/gdkcolor-x11.c index 5cc43e136a..53d53cce35 100644 --- a/gdk/x11/gdkcolor-x11.c +++ b/gdk/x11/gdkcolor-x11.c @@ -715,7 +715,7 @@ gdk_colormap_free_colors (GdkColormap *colormap, } } - if (npixels_to_free && !private->private_val && !private->screen->closed) + if (npixels && !private->private_val && !private->screen->closed) XFreeColors (GDK_SCREEN_XDISPLAY (private->screen), private->xcolormap, pixels, npixels, 0); @@ -868,12 +868,18 @@ gdk_colormap_alloc_colors_private (GdkColormap *colormap, store[nstore].blue = colors[i].blue; store[nstore].green = colors[i].green; store[nstore].pixel = index; + store[nstore].flags = DoRed | DoGreen | DoBlue; nstore++; success[i] = TRUE; - colors[i].pixel = index; + + colormap->colors[i] = colors[i]; private->info[index].ref_count++; + + g_hash_table_insert (private->hash, + &colormap->colors[index], + &colormap->colors[index]); } else nremaining++;