]> Pileus Git - ~andy/gtk/commitdiff
Remove the attempt-to-allocate then free code. To handle multiple people
authorOwen Taylor <otaylor@redhat.com>
Thu, 30 Jan 2003 21:19:46 +0000 (21:19 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 30 Jan 2003 21:19:46 +0000 (21:19 +0000)
Thu Jan 30 16:01:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the
        attempt-to-allocate then free code. To handle multiple
        people allocating colors at the same time, we need
        to just go ahead and try. (#102213, Shivram U)

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

index bc526c92b10edf10f45161867cc0481ef08b3696..09d9fdf5fe802067d32f52ab879b74cfa3a0a634 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Jan 30 16:01:29 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the 
+       attempt-to-allocate then free code. To handle multiple
+       people allocating colors at the same time, we need
+       to just go ahead and try. (#102213, Shivram U)
+       
 2003-01-30  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkcolorsel.c (palette_paint): Explicitely draw an opaque
index bc526c92b10edf10f45161867cc0481ef08b3696..09d9fdf5fe802067d32f52ab879b74cfa3a0a634 100644 (file)
@@ -1,3 +1,10 @@
+Thu Jan 30 16:01:29 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the 
+       attempt-to-allocate then free code. To handle multiple
+       people allocating colors at the same time, we need
+       to just go ahead and try. (#102213, Shivram U)
+       
 2003-01-30  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkcolorsel.c (palette_paint): Explicitely draw an opaque
index bc526c92b10edf10f45161867cc0481ef08b3696..09d9fdf5fe802067d32f52ab879b74cfa3a0a634 100644 (file)
@@ -1,3 +1,10 @@
+Thu Jan 30 16:01:29 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the 
+       attempt-to-allocate then free code. To handle multiple
+       people allocating colors at the same time, we need
+       to just go ahead and try. (#102213, Shivram U)
+       
 2003-01-30  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkcolorsel.c (palette_paint): Explicitely draw an opaque
index bc526c92b10edf10f45161867cc0481ef08b3696..09d9fdf5fe802067d32f52ab879b74cfa3a0a634 100644 (file)
@@ -1,3 +1,10 @@
+Thu Jan 30 16:01:29 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the 
+       attempt-to-allocate then free code. To handle multiple
+       people allocating colors at the same time, we need
+       to just go ahead and try. (#102213, Shivram U)
+       
 2003-01-30  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkcolorsel.c (palette_paint): Explicitely draw an opaque
index bc526c92b10edf10f45161867cc0481ef08b3696..09d9fdf5fe802067d32f52ab879b74cfa3a0a634 100644 (file)
@@ -1,3 +1,10 @@
+Thu Jan 30 16:01:29 2003  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the 
+       attempt-to-allocate then free code. To handle multiple
+       people allocating colors at the same time, we need
+       to just go ahead and try. (#102213, Shivram U)
+       
 2003-01-30  Daniel Elstner  <daniel.elstner@gmx.net>
 
        * gtk/gtkcolorsel.c (palette_paint): Explicitely draw an opaque
index 2d376e0dd9d63f82906ba1caa4466496aa27e4a8..38cccf492df140505d2126086585675188aec18a 100644 (file)
@@ -277,22 +277,6 @@ gdk_rgb_try_colormap (GdkRgbInfo *image_info, gboolean force,
       }
 #endif
 
-  if (colors_needed && 
-      image_info->visual->type != GDK_VISUAL_STATIC_COLOR)
-    {
-      if (!gdk_colors_alloc (cmap, 0, NULL, 0, junk, colors_needed))
-       {
-         char tmp_str[80];
-         
-         g_snprintf (tmp_str, 80,
-                  "%d %d %d colormap failed (in gdk_colors_alloc)\n",
-                  nr, ng, nb);
-         return gdk_rgb_cmap_fail (tmp_str, cmap, pixels);
-       }
-
-      gdk_colors_free (cmap, junk, colors_needed, 0);
-    }
-
   for (r = 0, i = 0; r < nr; r++)
     for (g = 0; g < ng; g++)
       for (b = 0; b < nb; b++, i++)