On Thu, Jul 31, 2014 at 10:06:14PM +0200, Walter Alejandro Iglesias wrote:
> # ---- THUMBNAILS ON ICONS -----------------------------------------------
> DestroyFunc Thumbnail
> AddToFunc Thumbnail
> + I Raise
> + I SetEnv Icon-$[w.id] $[w.iconfile]
^^^^^^^^^^^^
This variable is not used anywhere.
> + I TestRc (Match) Test (f $[w.miniiconfile], f /tmp/icon-$[w.id].png) \
^^^^^^^^^^^^^^^^^
Note that this function will never run for windows that do not
have an associated miniicon.
> DestroyFunc DeThumbnail
> AddToFunc DeThumbnail
> + I PipeRead "echo WindowStyle Icon \\$\\[Icon-$[w.id]\\]"
> + I UnsetEnv Icon-$[w.id]
> + I Exec rm -f /tmp/icon-$[w.id].png
Add
+ I DestroyWindowStyle
(see explanation below)
> That works as expected replacing icons with thumbnails, thanks to the
> "IconOverride" option passed to WindowStyle. Now, if instead of using
> the Thumbnail function I use just "Iconify" to iconify the window with a
> style as you told me:
>
> Style xboard IconOverride, Icon xboard.png
>
> this time the same IconOverride option doesn't do its magic.
It doesn't work because you forget to destroy the window specific
style. A style specified with the WindowStyle command is always
preferred over styles specified with the Style command. You need
to add this at the end of the DeThumbnail fucntion:
+ I DestroyWindowStyle
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt