Subject: FVWM: label for iconified window

From: Tony Tung <[email-masked]>
Date: Fri, 4 Jan 2002 15:16:04 -0800 (PST)

Hi all,

I attempted to search for a solution to this problem on Google, but to no
avail.  I would like to draw upon your expertise.

Pine (the mailreader) sends an escape sequence to change the label for its
icon when new mail arrives and the window is iconified.  However, the
space allocated for the label by fvwm2 is fixed at the time the window is
iconified.  Therefore, the new label does not show in its entirety if it
is longer than the label at the time the window is iconified.  If I move
my mouse over the icon, however, the label is resized correctly (I have
sloppy focus on, which I assume makes a difference).

Is there a way to automatically resize the icon label with fvwm2 2.4?
Thanks for any help.

Tony

--
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: Sat, 5 Jan 2002 01:32:36 +0000

> Is there a way to automatically resize the icon label with fvwm2 2.4?

If I understand you correctly, this is not related to pine or xterm.

The width of the icon title in the collapsed state is always fixed, it is
comparable with the width of the icon itself. When you point to the icon
picture or title, the title is expanded fully if needed.

This is done intentionally, otherwise a long icon title (think Netscape)
would overlap all other icon titles in the raw. Several such long icon
titles may create bad visual effects if they are always fully expanded.

The expanding behaviour is the same for all focus policies, i.e. it works
on mouse enter and mouse leave rather than on focus.

Currently there is no way to change this feature that some of developers
consider very good. If you are not convinced that your desktop looks nicer
with short (fixed size) icon titles, you may fill a new feature request
using the web.

Regards,
Mikhael.

---

From: Tony Tung <[email-masked]>
Date: Sat, 5 Jan 2002 01:16:28 -0800 (PST)

> If I understand you correctly, this is not related to pine or xterm.

That is correct.

> picture or title, the title is expanded fully if needed.

That is interesting.  On my setup, the width of the icon title in the
collapsed state is not fixed.  It is set to the minimum width necessary to
hold the text, and adjusted to hold new text when the mouse moves over it.
Even when the mouse leaves, the new width is retained.

Could this be an option that I have set in my .fvwm2rc?

Thanks,
Tony

---

From: Dan Espen <[email-masked]>
Date: Sat, 05 Jan 2002 09:49:37 -0500

> Could this be an option that I have set in my .fvwm2rc?

I don't see anything in the code or man page that would do that.
That doesn't mean it isn't there, I just don't see it.

Just to check, I just did:

xterm -name 12345678901234567890 -iconic

which gave me:

I also had it change icon names while it was iconified and it kept the
narrow icon title.

Maybe you have a patched fvwm?

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570

---

From: Tony Tung <[email-masked]>
Date: Sat, 5 Jan 2002 10:50:57 -0800 (PST)

> xterm -name 12345678901234567890 -iconic

I don't use the graphical icons.  When I iconify, all I get is the text
label.

Could that make a difference?

Thanks,
Tony

---

From: Dan Espen <[email-masked]>
Date: Sat, 05 Jan 2002 14:50:24 -0500

> Could that make a difference?

Sure it would make a difference, the normal width of the icon title
matches the width of the icon.

What is it you wanted it to do in this case?

As someone else mentioned if we let the icon title expand without limit,
Netscape will have the icon title go right across the screen.  Of course,
Netscape itself supplies and icon, so maybe the behavior of Netscape
would be different...

---

From: Tony Tung <[email-masked]>
Date: Sat, 5 Jan 2002 12:10:41 -0800 (PST)

> Netscape itself supplies and icon, so maybe the behavior of Netscape

Ah, that explains things.

Is there a way to expand the icon title to dynamically match the width of
the text (in the case of not having a graphical icon)?  I wouldn't mind
doing the coding myself, but I'd like some pointers to the areas of code
to poke around in.

Thanks,
Tony

---

From: Dan Espen <[email-masked]>
Date: Sat, 05 Jan 2002 16:14:05 -0500

> doing the coding myself, but I'd like some pointers to the areas of code

fvwm/icons.c

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 5 Jan 2002 22:06:57 +0100

> Could that make a difference?

It does make a difference and it's a bug.  I'll see what I can do.

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" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 6 Jan 2002 02:05:22 +0100

> I don't use the graphical icons.  When I iconify, all I get is the text

Fixed with the next aplha release or snapshot.

Bye

Dominik ^_^  ^_^

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 5 Jan 2002 22:06:21 +0100

> xterm -name 12345678901234567890 -iconic

[snip]

> Maybe you have a patched fvwm?

No, he's right.  Try this:

  Style rxvt Icon missing_icon.xpm
  Style rxvt IconTitle
  Style rxvt SloppyFocus

(with an icon file that does not exist).  Now, create an rxvt and
run bash or zsh in it (may work with other shells too, but no
guarantees):

  $ rxvt

Then in the shell in the rxvt:

  $ echo "\[\e]1;short_icon_title\007"
 
This sets the icon title to "short_icon_title".  Next, type

  $ echo "\[\e]1;a_much_looooooooonger_icon_title\007"

but don't press return yet.  Iconify the rxvt and move the pointer
over it to focus it.  The icon title shows the complete text.
When you now hit return, the title expands to fit the new, longer
icon title, but when you move the pointer away from the icon, it
collapses to the size of the old icon title.  To clarify this, I
attached three screenshots.  It looks like the icon title width is
not updated while the title is expanded.

---

BTW, what is the right way to disable icons but show icon titles?
I found no other way than specifying an illegal pixmap file.  If I
have a default icon, I see no proper way to disable pixmaps for
certain applications.

Bye

Dominik ^_^  ^_^

---

From: Dan Espen <[email-masked]>
Date: Sat, 05 Jan 2002 20:25:41 -0500

> No, he's right.  Try this:

It all became clear to me once Tony explained that he wasn't using
icons, only icon titles.

> have a default icon, I see no proper way to disable pixmaps for

Although icon titles without icons work with FVWM,
its not really supported in the sense that there is no clean way
to turn it on.  (I guess if you never define a default icon its on.)

Wouldn't FvwmIconMan do a better job?

If we did want to make this a viable option, I think we'd need
some way to limit the width of the title, left and right adjust it...

---

From: Tony Tung <[email-masked]>
Date: Sat, 5 Jan 2002 17:26:15 -0800 (PST)

> Fixed with the next aplha release or snapshot.

I just finished fixing it myself.  It appears to work, though I wonder if
I did it right. :)

Thanks to everyone who helped me with this.

Tony

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 7 Jan 2002 11:59:24 +0100

> Wouldn't FvwmIconMan do a better job?

Well, it does.

> some way to limit the width of the title, left and right adjust it...

To be honest, I simply have some title-only icons because the
pixmap wasn't in the path anymore after some OS update.  Or
perhaps I renamed it and didn't update the config file - whatever.
And then I left it that way for testing purposes.

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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: Richard Lister <[email-masked]>
Date: Mon, 07 Jan 2002 13:28:40 -0500 (EST)

From: Dan Espen <[email-masked]>
Subject: Re: FVWM: label for iconified window 
Date: Sat, 05 Jan 2002 20:25:41 -0500

> to turn it on.  (I guess if you never define a default icon its on.)

I wrote a trivial hack for this in 1996, which allows:

  Icon NoPixmap

to turn off icons, even for motif apps that supply them (such as netscape).
It was in the code back them, but I switched to using FvwmIconMan a long
time ago, so I don't know if its still there in the latest. grep icons.c
for "NoPixmap".

There was no option to limit title width, but in those days people
generally set more reasonable titles on their web pages :-)

Cheers
Ric

Richard J Lister
Dept of Neuroscience, Georgetown University Medical Center
Email: [email-masked] 
Web: http://cns.georgetown.edu/~ric/