Subject: FVWM: argh

From: "Todd Fries" <[email-masked]>
Date: Wed, 8 May 1996 08:06:18 -0500 (CDT)

don't apply that patch I just submitted.  Somehow it causes fvwm to
seg fault for me....when I am in an environment where I can run
gdb on the window manager, I will try to see why it does...unless
someone on the list wants to point out the obvious mistake I
should be seeing..

-- 
Todd T. Fries
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Risto J Laitinen <[email-masked]>
Date: Wed, 8 May 1996 16:42:01 +0300

> someone on the list wants to point out the obvious mistake I

strdup(NULL) chokes at least on Linux, whereas on HP-UX it works
like strdup("").

Something like 
	#define strdup_safe(s) ((s)?strdup(s):NULL)
should do what you inteded.
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Niles <[email-masked]>
Date: Wed, 8 May 1996 09:49:10 -0500

> someone on the list wants to point out the obvious mistake I

I'm not sure why it it seg faulting, but I think I see the reason that
the color is/was not working.

>     backcolor = nptr->BackColor = backcolor;

This is the same as:

	nptr->BackColor = backcolor;
	backcolor=backcolor;

The net affect is that the background color does not change to the new style.
It should also have the affect of changing the color of the original window.
Just a momemt, let me check...

Well, almost.  The affect is that both windows end up with a grey background
color. That certainly answers that!  Now, lets see if changing it to

	backcolor = nptr->BackColor; 

works...

Yup, that fixes it!

The patch to fix it follows.

Dan Niles

--------------------------------------------------------------------------
--- style.c.orig	Wed May  8 09:46:27 1996
+++ style.c	Wed May  8 09:44:01 1996
@@ -566,7 +566,7 @@
               bw            = nptr->border_width;
               nobw          = nptr->resize_width;
               forecolor     = nptr->ForeColor;
-              backcolor     = nptr->BackColor = backcolor;
+              backcolor     = nptr->BackColor;
               BoxFillMethod = nptr->BoxFillMethod;
               IconBox[0]    = nptr->IconBox[0];
               IconBox[1]    = nptr->IconBox[1];
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Todd Fries)
Date: Wed, 8 May 1996 10:12:00 -0500 (CDT)

> 	backcolor = nptr->BackColor; 

I noticed this when I was glancing at the sources.  I can't believe
I had that in the patch I submitted!  grr... I better do more checking
before I submit patches from now on :-(
-- 
Todd Fries
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: <[email-masked]> (Charles Hines)
Date: Wed, 8 May 1996 11:19:21 -0400

>>>>> "Todd" == Todd Fries <[email-masked]> writes:

>> backcolor = nptr->BackColor;

Todd> I noticed this when I was glancing at the sources.  I can't
Todd> believe I had that in the patch I submitted!  grr... I better do
Todd> more checking before I submit patches from now on :-(

And more importantly, *I* should look them over better before I apply
them... :)

Chuck