On Fri, Aug 01, 2014 at 06:45:55AM +0100, Dominik Vogt wrote:
> 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 thought it was used by DeThumbnail.  Now I see the UnsetEnv on
DeThumbnail is useless too so I removed both.


>
>> + 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.

I think that the Test is there for Windows that don't have mini icons
associated to show just the thumbnail (without the mini icon).


>
>> 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.

I wake up this morning thinking exactly on that.  I'd replaced Thumbnail
with Iconify in the ShowDesktop function (to speed it up) and forgot
about FvwmEvent in DeThumbnail.  I had it in front of my nose!

Sorry guys, I'm getting old and idiot.


> You need
> to add this at the end of the DeThumbnail fucntion:
>
>   + I DestroyWindowStyle

I've added this to DeThumbnail and all works perfectly.  Thanks Dominik.


>
> Ciao
>
> Dominik ^_^  ^_^
>
> --
>
> Dominik Vogt


        Walter




Reply via email to