Re: FVWM: strings in icons

From: Richard Lister <listerrj_at_helios.aston.ac.uk>
Date: Thu, 15 Aug 1996 10:14:59 +0100

On Wed, 14 Aug 1996 15:53:49 -0700
Achyutram Bhamidipaty <ram_at_epic.com>
wrote concerning 'FVWM: strings in icons':
>
> My xterms frequently change the string that is displayed
> in the icon. I've noticed that fvwm-2.0.43 does not
> resize the icon to take the new name into account.
>
> Hmm. Now that I think about that its not completely true. If
> the mouse moves over the icon then the whole name is displayed.
> But when the mouse is moved away from the icon the original
> (truncated) name comes back. Finally if I restart fvwm the
> icons end up with the correct info.

Ram

If you use pixmaps for icons, the icon title will always be the same
width as the pixmap. If you use no pixmaps (i.e. something like
Style "xterm" Icon none.xpm) then you can fix the problem with
the following patch. Chuck said this will be included in the next release.

Apply the patch in the fvwm-2.0.43/ directory.

Ric


--- fvwm/icons.c.orig Sun Jun 9 20:57:11 1996
+++ fvwm/icons.c Thu Jun 13 10:55:51 1996
_at_@ -809,6 +809,15 @@
     else
       CreateIconWindow(tmp_win, def_x, def_y);
 
+ /* if no pixmap we want icon width to change to text width every iconify */
+ if( (tmp_win->icon_w != None) && (tmp_win->icon_pixmap_w == None) ) {
+ tmp_win->icon_t_width =
+ XTextWidth(Scr.IconFont.font,tmp_win->icon_name,
+ strlen(tmp_win->icon_name));
+ tmp_win->icon_p_width = tmp_win->icon_t_width+6;
+ tmp_win->icon_w_width = tmp_win->icon_p_width;
+ }
+
   AutoPlace(tmp_win);
   tmp_win->flags |= ICONIFIED;
   tmp_win->flags &= ~ICON_UNMAPPED;
--
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 majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Aug 15 1996 - 04:20:33 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST