Subject: Purify results for FvwmIconMan and WinList

From: Brad Giaccio <[email-masked]>
Date: Tue, 28 Sep 1999 09:57:57 -0400

Well, FvwmWinList doesn't seem to have any purify problems.  Here are
some fixes for FvwmIconMan and the log for some unresolved memory leaks.
The leaks come from the structs allocated for functions and mouse
bindings, never getting freed, we can probablly safetlly ignore them but
I thought I would through them in for completness sake.

Index: FvwmIconMan.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/FvwmIconMan.c,v
retrieving revision 1.23
diff -u -b -B -r1.23 FvwmIconMan.c
Index: fvwm.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/fvwm.c,v
retrieving revision 1.18
diff -u -b -B -r1.18 fvwm.c
--- fvwm.c	1999/09/19 20:58:38	1.18
+++ fvwm.c	1999/09/28 12:47:20
@@ -401,6 +401,10 @@
     ConsoleDebug (FVWM, "destroy_window: deleting windows_button\n");
     delete_windows_button (win);
   }
+  if (win == fvwm_focus_win)
+  {
+    fvwm_focus_win = NULL;
+  }
   free_windata (win);
 }
 
Index: globals.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/globals.c,v
retrieving revision 1.8
diff -u -b -B -r1.8 globals.c
--- globals.c	1999/08/05 16:41:30	1.8
+++ globals.c	1999/09/28 12:47:20
@@ -29,7 +29,8 @@
   { "focus", BUTTON_UP, { "white", "gray" }, { "black", "black" } },
   { "select", BUTTON_FLAT, { "black", "black" }, { "white", "gray" } },
   { "focusandselect", BUTTON_FLAT, { "white", "gray" }, { "black", "black" } },
-  { "title", BUTTON_EDGEUP, { "black", "black"}, {"white", "gray"} }
+  { "title", BUTTON_EDGEUP, { "black", "black"}, {"white", "gray"} },
+  { "default", BUTTON_FLAT, { "black", "black"}, {"white", "gray"} }
 };
 
 int Fvwm_fd[2];
Index: x.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/x.c,v
retrieving revision 1.30
diff -u -b -B -r1.30 x.c
--- x.c	1999/09/19 20:58:39	1.30
+++ x.c	1999/09/28 12:47:20
@@ -590,6 +590,7 @@
   }
 
   for ( i = 0; i < NUM_CONTEXTS; i++ ) {
+    man->pixmap[i] = None;
     if (man->colorsets[i] > -1) {
       man->backcolor[i] = Colorset[man->colorsets[i] % nColorsets].bg;
     }
@@ -667,8 +668,9 @@
 
   if (man->button_geometry_str) {
     int val;
+    x = y = width = height = 0;
     val = XParseGeometry (man->button_geometry_str, &x, &y, &width, &height);
-    ConsoleDebug (X11, "button x, y, w, h = %d %d %d %d\n", x, y, width,
+    ConsoleDebug (X11, "button x, y, w, h = %d %d %u %u\n", x, y, width,
 		  height);
     if (val & WidthValue)
       man->geometry.boxwidth = width;

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 28 Sep 1999 18:42:59 +0200

On Tue, Sep 28, 1999 at 09:57:57AM -0400, [email-masked] wrote:
>...

Can you provide a ChangeLog patch too?

Bye

Dominik ^_^

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Brad Giaccio <[email-masked]>
Date: Wed, 29 Sep 1999 08:34:17 -0400

> Can you provide a ChangeLog patch too?

Oops, I forgot to include it in the diff.

1999-09-29  Brad Giaccio  <[email-masked]>

	* FvwmIconMan/x.c (X_init_manager): set pixmaps to None on init since we
	check for it later
	(X_init_manager): cleaned up an UMR on a print

	* FvwmIconMan/globals.c: contextDefaults needed another entry since I
	increased the number of contexts when I did the colorset stuff

	* FvwmIconMan/fvwm.c (destroy_window): setting focus_win to null helps
	avoid possible free memory reads/writes

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]