]> Pileus Git - ~andy/gtk/commitdiff
When allocating non-writeable colors, fill in the flags field of the
authorOwen Taylor <otaylor@redhat.com>
Mon, 9 Dec 2002 02:25:14 +0000 (02:25 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 9 Dec 2002 02:25:14 +0000 (02:25 +0000)
Sun Dec  8 21:22:46 2002  Owen Taylor  <otaylor@redhat.com>

        * 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.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/gdkcolor-x11.c

index 0afdaeb2ea08b11c1612b85c3866ccebd53fc637..bc8d3c8767cecf61e5c57bdb75eb0b41330fb01c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sun Dec  8 21:22:46 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 0afdaeb2ea08b11c1612b85c3866ccebd53fc637..bc8d3c8767cecf61e5c57bdb75eb0b41330fb01c 100644 (file)
@@ -1,3 +1,13 @@
+Sun Dec  8 21:22:46 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 0afdaeb2ea08b11c1612b85c3866ccebd53fc637..bc8d3c8767cecf61e5c57bdb75eb0b41330fb01c 100644 (file)
@@ -1,3 +1,13 @@
+Sun Dec  8 21:22:46 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 0afdaeb2ea08b11c1612b85c3866ccebd53fc637..bc8d3c8767cecf61e5c57bdb75eb0b41330fb01c 100644 (file)
@@ -1,3 +1,13 @@
+Sun Dec  8 21:22:46 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 0afdaeb2ea08b11c1612b85c3866ccebd53fc637..bc8d3c8767cecf61e5c57bdb75eb0b41330fb01c 100644 (file)
@@ -1,3 +1,13 @@
+Sun Dec  8 21:22:46 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 0afdaeb2ea08b11c1612b85c3866ccebd53fc637..bc8d3c8767cecf61e5c57bdb75eb0b41330fb01c 100644 (file)
@@ -1,3 +1,13 @@
+Sun Dec  8 21:22:46 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 5cc43e136a7881f257d0435e33a51f1a7ad02ec9..53d53cce35ab8c278b145c501d4cf01970280bca 100644 (file)
@@ -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++;