Tavis> I'm having real trouble understanding how to use schedule
Tavis> correctly so that my scheduled jobs will work (or at least
Tavis> remain queued) during periods where, for example, the pointer
Tavis> is grabbed.
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.
Tavis> The idea is to keep a xwd cache of windows while they are
Tavis> unobscured, so that when they are obscured I can still use
Tavis> screenshots of them,
At the moment, I'm using FvwmAuto to take a screenshot of every window
that has had focus for at least 10 seconds (once) and it works pretty
well. But I probably will switch to your method soon.
Tavis> But my scheduled jobs keep dissapearing, can anyone
Tavis> offer any suggestions?
Since it's a mystery for me what exactly happens to scheduled command
while switching the window context, I'd (re)schedule NewWindowFunc
every time the window context is changed (using FvwmEvent). To avoid
having more and more "threads" taking snapshots, I'd use a fixed
schedule id (say 173) and add deschedule to the code:
AddToFunc NewWindowFunc
+ I Test (foobar) Exec something
+ I Echo Still running!
+ I Deschedule 173
+ I Schedule 173 5000 NewWindowFunc
Piotr
--
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 - 12:29:57 BST