Re: FVWM: Using Schedule reliably

From: Tavis Ormandy <taviso_at_sdf.lonestar.org>
Date: Tue, 11 May 2004 21:34:11 +0100

--On Tuesday, May 11, 2004 18:27:24 +0100 Piotr Zielinski
<Piotr.Zielinski_at_cl.cam.ac.uk> wrote:
>
> I posted a similar question a couple of weeks ago but there were no
> replies. The manual says that a scheduled command X will be executed
> in the same window context as "Schedule 4234 X", but it's rather vague
> on how this is implemented. I can only _speculate_ that when the
> pointer is about to leave a window, all scheduled commands for that
> window are executed. What happens to all Schedule commands issued by
> these scheduled commands I don't know. Sometimes they seem to
> disappear. Sometimes not.
>

Thanks Piotr, you gave me some ideas to think about :)

This is what I'm using right now which seems to work quite well (and the
overhead of running xwd every few seconds is not noticable at all), I've
had to use PassId instead of $[w.id] because it gets confused if a window
dies..

I have it bound to my Menu key, like this:

Key Menu A A NoWindow FvwmExpose

DestroyModuleConfig ExposeCache: *
*ExposeCache: PassId
*ExposeCache: add_window CacheWindow
*ExposeCache: raise_window CacheWindow
*ExposeCache: focus_change CacheWindow
*ExposeCache: dewindowshade CacheWindow

DestroyFunc CacheWindow
AddToFunc CacheWindow
+ I Deschedule $0
+ I Schedule 0 ThisWindow (Raised) Exec nice xwd -screen -silent -id $0
-out $[FVWM_USERDIR]/cache.$0.xwd
+ I ThisWindow Schedule 5000 $0 CacheWindow $0
+ I TestRc (NoMatch) Exec rm -f $[FVWM_USERDIR]/cache.$0.xwd

AddToFunc ExitFunction I Test (!ToRestart) Exec rm -f
$[FVWM_USERDIR]/cache.*
AddToFunc StartFunction I Module FvwmEvent ExposeCache

DestroyFunc FvwmExpose
AddToFunc FvwmExpose
+ I AddToMenu FvwmExposeMenu ".: e x p o s e :." Title
+ I + DynamicPopDownAction DestroyMenu FvwmExposeMenu
+ I All (CurrentDesk, AcceptsFocus, !CirculateHit) PipeRead "convert -scale
128 -frame 1x1 -mattecolor black -quality 0 \
        xwd:$[FVWM_USERDIR]/cache.$[w.id].xwd
png:$[FVWM_USERDIR]/icon.exp.$[w.id].png && \
        echo AddToMenu FvwmExposeMenu
%$[FVWM_USERDIR]/icon.exp.$[w.id].png%\\\'\"$[w.name]\"\\\' WindowID
$[w.id] WindowListFunc \
        || echo AddToMenu FvwmExposeMenu %$[w.miniiconfile]%\\\'\"$[w.name]\"\\\'
WindowID $[w.id] WindowListFunc; \
        echo AddToMenu FvwmExposeMenu \\\"\\\" Nop"
+ I Popup FvwmExposeMenu
+ I Exec exec rm -f $[FVWM_USERDIR]/icon.exp.*

-- 
-------------------------------------
taviso_at_sdf.lonestar.org | finger me for my gpg key.
-------------------------------------------------------
--
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 Tue May 11 2004 - 15:35:52 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:56 BST