[color=blue]
Added CODE blocks around code parts – please ensure you do this in the future, bricem13
– Thomas Adam[/color]
Hi
I use the thumbnail code ogf sacha with imlib2 (http://fvwm.lair.be/viewtopic.php?t=190&highlight=thumbnail)
The thumbnail function do not work with qt applications, those ones are irremediably iconified even if I can do by hand a thumbnail of them!
My thumbnail function is:
DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I Raise
+ I SetEnv Icon-$[w.id] $[w.IconFile]
+ I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead \
"/$[fvwm_scripts]/thumb $[w.id] $[fvwm_icon_size] /dev/shm/icon.tmp.$[w.id].png; \
composite -geometry +5+5 $[w.MiniIconFile] \
/dev/shm/icon.tmp.$[w.id].png /dev/shm/icon.tmp.$[w.id].png; \
echo WindowStyle IconOverride, Icon /dev/shm/icon.tmp.$[w.id].png"
+ I Iconify
Even with the taviso’s function, the thumbnailing of a qt apps does not work!
Any idea???
Regards, Brice
There’s nothing special about QT applications in this regard – I assume the function works OK with other applications? Indeed, how are you calling the function?
– Thomas Adam
Ok Thomas I use code in the future sorry for that
The thumbnail function uses a binary named thumb compiled from the c code of Sacha.
Then I can run the binary from the command line like that:
./thumb window-id 128 test.png
and it creates a thumbnail called test.png. I get the window id simply with fvwm ident.
My thumbnail function uses thumb to create a thumbnail which will be used as icon.
This function work fine with other applications, I simply call it from:
Mouse 0 6 A Thumbnail
as usual.
Regards, Brice
Hi
I was wrong!!! I did bull-shit in my thumbnail function with the composite of the miniicon… it was not possible to do a thumbnail of the qt-apps because then don’t have a miniicon defined… So now I test the existence of the miniicon before doing a composite!
The right code is:
[code]DestroyFunc Thumbnail
AddToFunc Thumbnail
- I Raise
- I SetEnv Icon-$[w.id] $[w.IconFile]
- I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead
“/$[fvwm_scripts]/thumb $[w.id] $[fvwm_icon_size] /dev/shm/icon.tmp.$[w.id].png;
echo WindowStyle IconOverride, Icon /dev/shm/icon.tmp.$[w.id].png”
- I TestRc (Match) Test (f $[w.miniiconfile], f /dev/shm/icon.tmp.$[w.id].png) PipeRead
“composite -geometry +2+4 $[w.miniiconfile] /dev/shm/icon.tmp.$[w.id].png
/dev/shm/icon.tmp.$[w.id].png; echo Nop”
- I Iconify
[/code]
soory once more…
Brice