On 24 Nov 2003 14:10:45 +0000, Tavis Ormandy wrote:
>
> On Mon, Nov 24, 2003 at 01:36:52PM +0000, Mikhael Goikhman wrote:
> > On 24 Nov 2003 12:35:28 +0000, Tavis Ormandy wrote:
> > >
> > > Can anyone think of a way to restore a window's Icon after changing it,
> > > or is there a way of getting that information from within an function?
> >
> > You can't push/pop Icon files for a window, only one icon is stored.
> > Hovewer you may do DestroyWindowStyle on deiconify if this helps.
>
> Ahh! I should have tried that, thanks.
It would be really nice if we had an additional parameter to DestroyStyle
and DestroyWindowStyle to destroy only one specific style option, not all
style entry options. This would allow a lot of new dynamical functionality.
In your case you destroy all window-specific changes, not just Icon.
> > You may also listen to destroy_window packet and then remove the icons,
> > not immediately after one second.
>
> Yep, I was planning on doing that, just wanted to get it working nicely
> first :)
>
> > I would use "import -geometry 64 -resize 64 -silent" without additional
> > convert and use *IconTitle* and *IconBackground* style options instead.
> > Should be faster.
>
> Cool, I didnt realise you could do that...this looks much nicer now :)
>
> DestroyFunc IconifyWithScreenshot
> AddToFunc IconifyWithScreenshot
> + I Raise
> + I PipeRead "import -geometry 64 -resize 64 -silent -window $[w.id] $[HOME]/.fvwm/icon.tmp.$[w.id].png \
> && echo WindowStyle IconOverride, Icon $[HOME]/.fvwm/icon.tmp.$[w.id].png \
> || echo Nop"
> + I Iconify
>
> DestroyFunc DeIconifyWithScreenshot
> AddToFunc DeIconifyWithScreenshot
> + I WindowID $0 DestroyWindowStyle
> + I Exec rm -f $HOME/.fvwm/icon.tmp.$0.png
>
> DestroyModuleConfig FvwmEvent-IconWatch: *
> *FvwmEvent-IconWatch: Cmd
> *FvwmEvent-IconWatch: PassID
> *FvwmEvent-IconWatch: deiconify DeIconifyWithScreenshot
Please do not do it like this. The last 9 lines should be:
DestroyFunc DeIconifyWithScreenshot
AddToFunc DeIconifyWithScreenshot
+ I DestroyWindowStyle
+ I Exec rm -f $HOME/.fvwm/icon.tmp.$[w.id].png
DestroyModuleConfig FvwmEvent-IconWatch: *
*FvwmEvent-IconWatch: deiconify DeIconifyWithScreenshot
Or to eliminate Exec call, even use: Test (f file) Exec exec rm file.
On another topic, reading the Gentoo forum, it seems that Gentoo package
of fvwm-themes is both old (0.6.2) and does not work with fvwm 2.5.x (how
is this possible?). This should be fixed by Gentoo people, I guess.
Regards,
Mikhael.
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Nov 24 2003 - 10:22:09 GMT