Subject: dynamic icon title width

From: Richard Lister <[email-masked]>
Date: Tue, 30 Jul 1996 12:12:59 +0100

Hi Chuck

A couple of months ago I sent the following patch to recalculate icon
width for every Iconify when using icons with no pixmap (in case the
icon title has changed).

The patch didn't get into 2.0.43. Any chance it'll make it into 2.1, or
is there some reason not to use it?

Cheers
Ric

--- fvwm/icons.c.orig	Sun Jun  9 20:57:11 1996
+++ fvwm/icons.c	Thu Jun 13 10:55:51 1996
@@ -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;

 ~~~~~~~~~~~~~~ Richard J. Lister    [email-masked] ~~~~~~~~~~~~~~~~
            Research Assistant, Neural Computing Research Group
                  Aston University, Birmingham B4 7ET, UK
 ~~~~~~~~~~~~~~~~~ http://www.ncrg.aston.ac.uk/~listerrj/ ~~~~~~~~~~~~~~~~~~
--
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].