Re: FVWM: Hiding Icon images and Icon text seperately

From: Richard Lister <ric_at_giccs.georgetown.edu>
Date: Tue, 20 Oct 1998 16:08:31 -0400

On Tue, 20 Oct 1998 12:35:13 -0700
John Benninghoff <johnb_at_netscape.com>
wrote concerning 'Re: FVWM: Hiding Icon images and Icon text seperately':
>
> The icon text however is no longer trimmed regardless of the value of the width
> parameter. Strange.


And I've just found *another* patch I did so that the icon gets dynamically
resized every time the icon title changes (without needing to manually
deiconify and iconify again). I don't think this one was adopted for some
reason.



--- fvwm/icons.c.orig Fri Aug 16 11:30:38 1996
+++ fvwm/icons.c Fri Aug 16 12:38:30 1996
_at_@ -334,9 +334,15 @@
   
   Tmp_win->icon_t_width = XTextWidth(Scr.IconFont.font,Tmp_win->icon_name,
                                     strlen(Tmp_win->icon_name));
- /* clear the icon window, and trigger a re-draw via an expose event */
- if (Tmp_win->flags & ICONIFIED)
- XClearArea(dpy, Tmp_win->icon_w, 0, 0, 0, 0, True);
+
+ if (Tmp_win->flags & ICONIFIED) {
+ /* if no pixmap make new icon as the title may have changed size */
+ if( Tmp_win->icon_pixmap_w == None )
+ Iconify(Tmp_win, 0, 0);
+ else
+ /* clear the icon window, and trigger a re-draw via an expose event */
+ XClearArea(dpy, Tmp_win->icon_w, 0, 0, 0, 0, True);
+ }
   return;
 }



I might play around with some of this stuff sometime soon and put it
all into one patch for Brady to check out.

Ric

Richard J Lister, Georgetown Institute for Cognitive and Computational Sciences
Georgetown University Medical Center, Washington, DC 20007, USA
Phone: +1 202-687 2878
Email: ric_at_giccs.georgetown.edu
Web: http://www.giccs.georgetown.edu/~ric/
--
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 Tue Oct 20 1998 - 15:19:16 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:01 BST