Subject: Re: Notification: incoming/315

From: Dominik Vogt <[email-masked]>
Date: Fri, 3 Sep 1999 02:02:44 +0200

On Sun, Apr 25, 1999 at 02:47:31AM -0500, [email-masked] wrote:
> FVWM Bug Tracking notification
> 
> new message incoming/315
> 
> Message summary for PR#315
> 	From: [email-masked]
> 	Subject: Styles/Restart
> 	Date: Sun, 25 Apr 1999 02:47:30 -0500 (CDT)
> 	0 replies 	0 followups
> 
> ====> ORIGINAL MESSAGE FOLLOWS <====
> 
> >From [email-masked]  Sun Apr 25 02:47:30 1999
> Received: from localhost (localhost [127.0.0.1])
> 	by larry.math.uh.edu (8.9.1/8.9.1) with ESMTP id CAA15585
> 	for <[email-masked]>; Sun, 25 Apr 1999 02:47:30 -0500 (CDT)
> Date: Sun, 25 Apr 1999 02:47:30 -0500 (CDT)
> From: [email-masked]
> Message-Id: <[email-masked]>
> To: [email-masked]
> Subject: Styles/Restart
> 
> Full_Name: Jason Kibblewhite
> Version: 2.3.1
> CVS_Date: 4-23-99
> OS: Linux 2.2.5/Slackware 4.0 beta
> X_Server: Xfree 3.3.3.1
> Submission from: (NULL) (24.64.111.35)
> 
> 
> Recently I've been playing with making my own themes setup.  I basiclly
> have
> a menu item destroy the "default" decor and read in a new one then do a 
> recapture.  Seems to work pretty good.  Execpt for things that I have 
> defined in styles such as back and fore colors, and I have to do a full
> Fvwm2 restart to update them.  The man page clearly states that a
> recapture command sould do this.

The man page is very ambigous about this:

           AddToDecor flatness
            + ButtonStyle All ActiveUp (-- flat) \
              Inactive (-- flat)
            + TitleStyle -- flat
            + BorderStyle -- HiddenHandles NoInset
            + HilightColor white navy
            + Style "flatness" UseDecor flatness, \
              Color white/grey40,HandleWidth 4

           Style "xterm" UseStyle flatness

     An existing window's decor may be  reassigned  with
     ChangeDecor,  or  a  Style  command  followed  by a
     Recapture.  The decorations of all windows or of  a
     specific  decor  can  be  updated  with UpdateDecor
     (useful after decorations  are  modified;  changing
     Style  options  requires  a  Recapture instead).  A
     decor can be destroyed with DestroyDecor.

Technically this is all correct, but the 'UseStyle' style is not really
a style but instructs fvwm to built the final style from the styles
given with UseStyle. I.e. a style is updated when the decor changes,
but the style is not the one the windows are using. In the above
example the 'flatness' style is changed, but xterms use the 'xterm'
style, not the 'flatness' style. To make your xterms really use flatness,
the line 'Style "xterm" UseStyle flatness' must be issued again or
be added to the decor:

           AddToDecor flatness
            + ButtonStyle All ActiveUp (-- flat) \ 
              Inactive (-- flat)
            + TitleStyle -- flat 
            + BorderStyle -- HiddenHandles NoInset 
            + HilightColor white navy
            + Style "flatness" UseDecor flatness, \
              Color white/grey40,HandleWidth 4
            + Style "xterm" UseStyle flatness

I'll clarify this in the man page.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [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: Tim Phipps <[email-masked]>
Date: Fri, 03 Sep 1999 10:45:40 +0100

Dominik Vogt wrote:
>            AddToDecor flatness Style "flatness" UseDecor flatness

This really hurts my brain.  I didn't know you could add a style command
to a decor.  I'm not really sure I see the point anyway. I thought the
decors were supposed to be called from styles, not the other way around
e.g.

Style "xterm" UseDecor flatness

and then you can change the flatness decor and do an UpdateDecor to get
a new look without a recapture.

Dominik, you understand this stuff, could you rewrite the man page
examples to not use the same name for styles and decors? It's very
confusing even if it is very clever.

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 3 Sep 1999 12:15:45 +0200

On Fri, Sep 03, 1999 at 10:45:40AM +0100, Tim Phipps wrote:
> to a decor.

Neither did I. I discovered it by trial and error.

> I'm not really sure I see the point anyway. I thought the

The decors are working properly, but the 'UseStyle' style does not.
When you use

  style foo Usestyle bar

style foo gets updated immediately with all settings made in the
style bar already. Future modifications of bar have no effect on
foo. BTW, all this UseStyle stuff is a *huge* memory leak and I bet
there are abundant possibilities of getting a coredump. UseStyle
simply uses memcpy to overwrite already set styles!

> Dominik, you understand this stuff,

Uh, how did you get this idea? I just investigated #315, and what
I wrote in the man page is the workaround for the problem.

> could you rewrite the man page

Okay, I'll do it.

Bye

Dominik ^_^