Free the return value of gdk_list_visuals(). (Bug #1193 - Morten Welinder

Wed May  5 11:38:56 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
	return value of gdk_list_visuals().
	(Bug #1193 - Morten Welinder <terra@diku.dk>)
This commit is contained in:
Owen Taylor
1999-05-05 15:38:48 +00:00
committed by Owen Taylor
parent 17c8d9cd74
commit 7f9cb3548b
8 changed files with 51 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS

View File

@@ -1,3 +1,9 @@
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS

View File

@@ -1,3 +1,9 @@
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS

View File

@@ -1,3 +1,9 @@
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS

View File

@@ -1,3 +1,9 @@
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS

View File

@@ -1,3 +1,9 @@
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS

View File

@@ -1,3 +1,9 @@
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS

View File

@@ -482,27 +482,30 @@ gdk_rgb_score_visual (GdkVisual *visual)
static void
gdk_rgb_choose_visual (void)
{
GList *visuals;
GList *visuals, *tmp_list;
guint32 score, best_score;
GdkVisual *visual, *best_visual;
visuals = gdk_list_visuals ();
tmp_list = visuals;
best_visual = visuals->data;
best_visual = tmp_list->data;
best_score = gdk_rgb_score_visual (best_visual);
visuals = visuals->next;
while (visuals)
tmp_list = tmp_list->next;
while (tmp_list)
{
visual = visuals->data;
visual = tmp_list->data;
score = gdk_rgb_score_visual (visual);
if (score > best_score)
{
best_score = score;
best_visual = visual;
}
visuals = visuals->next;
tmp_list = tmp_list->next;
}
g_list_free (visuals);
image_info->visual = best_visual;
}