On Sat, Jan 10, 2004 at 06:16:03PM +0000, Mikhael Goikhman wrote: > On 10 Jan 2004 18:01:31 +0100, Marcus Lundblad wrote: > > > > On Sat, 10 Jan 2004, Klaus Umbach wrote: > > > > > On Sa, Jan 10, 2004 at 11:11:26 -0500, Dan Espen wrote: > > > > Klaus Umbach <[EMAIL PROTECTED]> writes: > > > > > Hello list, > > > > > is it possible, to let fvwm do something in the background? > > > > > With the help of Tavis Ormandy, I have a nice function now, to have > > > > > a thumbnail of an iconified window for the icon. It really looks > > > > > beautiful, but it takes some time, to iconify a fullscreen-window (2-3 > > > > > secs!). > > > > > While fvwm is working on that thumbnail-function, I cannot do > > > > > anything, > > > > > is it possible, put it in the background, so I don't have to wait > > > > > anymore, until I can work? > > > > > > > > Search the man page for "Schedule". > > > > > > No, that doesn't help, I still cannot do anything while this function is > > > processed. > > > > > > DestroyFunc Thumbnail > > > AddToFunc Thumbnail > > > + I Raise > > > + I PipeRead "xwd -silent -id $[w.id] > > > > $[HOME]/.fvwm/icon.tmp.$[w.id].xwd" > > > + I Iconify > > > + I Schedule 1000 $[w.id] PipeRead "nice -19 convert -resize 64x54 -frame > > > 1x1 -mattecolor black -quality 0 xwd:$[HOME]/.fvwm/icon.tmp.$[w.id].xwd > > > png:$[HOME]/.fvwm/icon.tmp.$[w.id].png && echo WindowStyle IconOverride, > > > UseIcons, Icon $[HOME]/.fvwm/icon.tmp.$[w.id].png,StaysOnBottom || echo > > > Nop" > > > > Try replacing "PipeRead" with "Exec". > > No, just replacing will not work here. You can't Iconify until the > screenshot is taken. > > You may avoid any freeze if you use this technology: > > DestroyFunc Thumbnail > AddToFunc Thumbnail > + I Raise > + I Exec create-xwd; FvwmCommand 'WindowId $[w.id] Iconify on'; \ > create-png; FvwmCommand 'WindowId $[w.id] WindowStyle Icon icon.png' > > (Just don't forget to run FvwmCommandS in StartFunction.) > > But then the results are unpredictable, you may lower your window or move > it outside the screen and the snapshot will be broken. Or you may Iconify > the window for the second time by a mistake (using the same function > obviously), then you may have real troubles with files. > > There is no way to prevent all these problems without locking, i.e. > you would better wait in PipeRead.
But only taking the screenshot has to be done synchronously. Try DestroyFunc Thumbnail AddToFunc Thumbnail + I Raise + I PipeRead "xwd -silent -id $[w.id] \ > $[HOME]/.fvwm/icon.tmp.$[w.id].xwd" + I Iconify + I Exec FvwmCommand 'WindowId $[w.id] Iconify on'; \ create-png; \ FvwmCommand 'WindowId $[w.id] WindowStyle Icon icon.png' Ciao Dominik ^_^ ^_^ -- 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 [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]