Subject: Re: FvwmButton panels documentation?

From: [email-masked]
Date: Wed, 11 Nov 1998 09:12:39 +0100

> If you have the privilege to commit patches for CVS, could you apply the
> patch at the end of this mail to the current CVS tree? It's generated based
> on the current CVS tree. It has been compiled and tested ok.

Of course I have, I'm the maintainer ;-) (although only for a while).
Anyway, I tried to get the animated panels running, but it
cordumps in free or malloc. There have been changes in parsing and
this may be related to the cores. Does the code with the patch below
work for you?

Bye

Dominik

P.S.: We should shift this discussion to the workers list.
-- 
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.hpc.uh.edu/fvwm/>.
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: Jui-Hsuan Feng <[email-masked]>
Date: Wed, 11 Nov 1998 14:35:33 CST

Hi,

> this may be related to the cores. Does the code with the patch below

Yes, I compile the whole fvwm2 from the current CVS tree. It works just fine
with the patch.

I guess there is a bug in the function 'CreateWindow()' in the file
FvwmButtons.c, which might be the cause of the coredumps. It was written as

  {
    myclassshints.res_name=(char *)malloc(sizeof(MyName)+6);
    strcpy(myclasshints.res_name,MyName);
    strcat(myclasshints.res_name,"Panel");
  }

I changed the first line to the following in the patch I sent you:

    myclassshints.res_name=(char *)malloc(strlen(MyName)+6);

The 'strlen' should be used to return the correct length of the string
instead of 'sizeof'. I hope it will fix the problem.

Regards
--
J. Joshua Feng                            (O)608/262-3640
Electrical & Computer Engr., Univ. of Wisconsin - Madison
http://www.cae.wisc.edu/~fengj  [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: [email-masked]
Date: Thu, 12 Nov 1998 11:09:35 +0100

> instead of 'sizeof'. I hope it will fix the problem.

Well, thanks. It works now. There was another problem with the example
from the manpage I don't quite understand. There was a 'Style' line
broken into several lines with '\'. That didn't work. Don't know why
since the code clearly copes with that.

Bye

Dominik

---

From: Jui-Hsuan Feng <[email-masked]>
Date: Thu, 12 Nov 1998 16:29:15 CST

Hi,

My fault. The example for that 'style' line in FvwmButtons manual is wrong.
Since the FvwmButtons parser can cope with '\', so I asummed that 'Style'
could do the same. But I fount that in the file 'fvwm/parse.c', things are
handled differently (the SKIPSPACE macro skips 'space chars' only). It seems
the 'Style' line has to split into two lines, as:

Style "FvwmButtonsPanel" Title, NoHandles, BorderWidth 0
Style "FvwmButtonsPanel" NoButton 2, NoButton 4, Sticky

Better update this in the CVS tree sometime.

---

From: [email-masked]
Date: Fri, 13 Nov 1998 10:56:00 +0100

On Thu, Nov 12, 1998 at 04:29:15PM -0600, [email-masked] wrote:
> handled differently (the SKIPSPACE macro skips 'space chars' only).

The Style command should never see the backslash. That should have
been done when the config file was read in.

> It seems the 'Style' line has to split into two lines, as:
> 

I have done this already.

Bye

Dominik