diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-01-30 21:19:46 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-01-30 21:19:46 +0000 |
commit | a04c0bb35ffaca2ed68812988dd54cf97fb4d0ca (patch) | |
tree | 3aa3d9d3bd4be163a472cecaa2d597dcadad7695 /gdk/gdkrgb.c | |
parent | 9ca772ac70c999f15c711a5c730ddad148985cf0 (diff) | |
download | gtk+-a04c0bb35ffaca2ed68812988dd54cf97fb4d0ca.tar.gz |
Remove the attempt-to-allocate then free code. To handle multiple people
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)
Diffstat (limited to 'gdk/gdkrgb.c')
-rw-r--r-- | gdk/gdkrgb.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/gdk/gdkrgb.c b/gdk/gdkrgb.c index 2d376e0dd9..38cccf492d 100644 --- a/gdk/gdkrgb.c +++ b/gdk/gdkrgb.c @@ -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++) |