On Fri, 16 Aug 1996 00:42:50 +0100
Richard Lister <listerrj_at_hpc.uh.edu>
wrote concerning 'Re: FVWM: strings in icons':
>
> Now, perhaps someone out there with better knowledge of X than me will
> tell me if I'm wrong, but there is no way for fvwm to be informed of
> a change in the icon name. It must make explicit calls to XGetWMIconName().
Well, duh! Repeat after me, Ric: "I will not try to think about difficult
X things while half-asleep". :-)
OK, I wasn't thinking. *Obviously* fvwm is informed of the icon_name change
since it redraws the name string in the icon. It just doesn't do a redraw
of the whole icon window.
So, here's what happens. Fvwm get a PropertyNotify event with value
XA_WM_ICON_NAME, and HandlePropertyNotify() calls RedoIconName().
It also does a BroadcastName() so that modules know about it, too.
RedoIconName() just does a redraw of the icon_name string in the icon
window. So, here's a patch to it that does a whole new Iconify() for
icons with no pixmap. (Can someone smart please check my call to
Iconify() isn't bogus). Note: if the icon name gets wider and the icon
window no longer fits in the icon box without overlap, the icon will move
to a new location. I find this OK ... do other people find this desirable?
Anyway, Ram, try this (in addition to my other patch) and see if it fixes
your problem.
--- 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;
}
Ric
Richard J. Lister, Research Assistant
Neural Computing Research Group, Aston University
r.j.lister_at_aston.ac.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" 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 Fri Aug 16 1996 - 06:50:38 BST