Subject: FVWM: Newbie question on decorating windows?

From: Eric Sun <[email-masked]>
Date: Thu, 24 Mar 2005 23:50:46 +0800

Dear all,

Some programs have more than two windows, like Gimp and 
MPlayer (one for GUI, another the movie window). 
Take MPlayer as an example, I want to decorate only the movie
window and not the main GUI window since it already has a
titlebar. How to do this? Thanks!

Eric
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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 Espen <[email-masked]>
Date: Thu, 24 Mar 2005 11:32:59 -0500

> titlebar. How to do this? Thanks!

Use FvwmIdent, it will show you the window Name, Class, and
Resource.

Fvwm style commands match on any of these 3 names.
You will probably find that the windows differ on one of
these names.  Use that name to set a unique style for the window.

-- 
Dan Espen                           E-mail: [email-masked]

---

From: Julien Guertault <[email-masked]>
Date: Thu, 24 Mar 2005 17:56:34 +0100

Hello,

> these names.  Use that name to set a unique style for the window.

I had this problem too and I "solved" it adding each window in
the .fvwm2rc. Though I consider it is just a work around, and I
was wondering if there was some real solution, like applying a
style to all windows created by a specific application...

For instance, how would you deal with an application creating
windows whose names/etc. are decided at runtime?

Regards,

-- 
Julien Guertault

---

From: Thomas Adam <[email-masked]>
Date: Thu, 24 Mar 2005 17:12:10 +0000

On Thu, Mar 24, 2005 at 11:50:46PM +0800, Eric Sun wrote:

> Some programs have more than two windows, like Gimp and MPlayer (one
> for GUI, another the movie window). Take MPlayer as an example, I want
> to decorate only the movie window and not the main GUI window since it
> already has a titlebar. How to do this? Thanks!

If you mean the main movie window of mplayer, then it should already be
decorated by default.  You can use FvwmIdent on the movie window to
ascertain the class/resource name, although you want something along the
lines of:

Style *Mplayer*  Title, Handles

If you find *Mplayer* is too greedy a match, the use the classname or
resourename returned from FvwmIdent.

-- Thomas Adam

--  
"One of us is a cigar stand, and one of us is a lovely blue incandescent
guillotine" -- Stephen Malkmus, "Type Slowly" from "Brighten The Corners"
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Mikhael Goikhman <[email-masked]>
Date: Thu, 24 Mar 2005 17:52:59 +0000

> windows whose names/etc. are decided at runtime?

A well behaved application should set some useful resource names.

If such windows have no meaningful resource or class set, but you know
the dynamical name pattern, then the solution is setup FvwmEvent with
window_name event and use WindowStyle command.

Regards,
Mikhael.

---

From: Thomas Adam <[email-masked]>
Date: Thu, 24 Mar 2005 18:20:13 +0000

On Thu, Mar 24, 2005 at 05:56:34PM +0100, Julien Guertault wrote:
> For instance, how would you deal with an application creating windows
> whose names/etc. are decided at runtime?

Use FvwmEvent:

*FvwmEvent-NewWindow: PassId
*FvwmEvent-NewWindow: add_window FuncDoThings

DestroyFunc FuncDoThings
AddToFunc   FuncDoThings
+ I ThisWindow ("some identifier") WindowStyle Title, Handles

AddToFunc StartFunction I FvwmEvent FvwmEvent-NewWindow

Of course "some identifier" could be anything -- $[w.id], $[w.name] or
what have you.  It's an example, and could probably be adapted as you
see fit.  :)

-- Thomas Adam

---

From: Eric Sun <[email-masked]>
Date: Fri, 25 Mar 2005 23:59:37 +0800

Thanks, All!

Problem solved by FvwmIdent.