Subject: FVWM: changing functions dynamically

From: Mark Krischer <[email-masked]>
Date: Thu, 13 Feb 1997 15:09:54 -0500

i'm trying to do this:

# Screen Saver and Lock functions
DestroyFunc     ScreenSaver

AddToFunc       ScreenSaver  "I"     Function ScreenSaver1

AddToFunc       ScreenSaver1 "I"     Exec xlock -mode flame -delay 5000
-nolock
+       "I"     DestroyFunc     ScreenSaver
+       "I"     AddToFunc       ScreenSaver "I" Function ScreenSaver2

AddToFunc       ScreenSaver2 "I"     DestroyFunc     ScreenSaver
+       "I"     AddToFunc       ScreenSaver "I" ScreenSaver3
+       "I"     Exec xlock -mode hop -delay 5000 -nolock

AddToFunc       ScreenSaver3 "I"     DestroyFunc     ScreenSaver
+       "I"     AddToFunc       ScreenSaver "I" ScreenSaver4
+       "I"     Exec xlock -mode pyro -delay 5000 -nolock

AddToFunc       ScreenSaver4 "I"     DestroyFunc     ScreenSaver
+       "I"     AddToFunc       ScreenSaver "I" ScreenSaver5
+       "I"     Exec xlock -mode qix -delay 5000 -nolock

AddToFunc       ScreenSaver5 "I"     DestroyFunc     ScreenSaver
+       "I"     AddToFunc       ScreenSaver "I" ScreenSaver1
+       "I"     Exec xlock -mode swarm -delay 5000 -nolock

i can get the screen saver to start, but doing so kills fvwm2.  what am
i doing wrong?

thanks in advance

--mark
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Jakob Schiotz <[email-masked]>
Date: Fri, 14 Feb 97 10:15:41 +0100

> +       "I"     AddToFunc       ScreenSaver "I" Function ScreenSaver2
	[ ... ]
 > i can get the screen saver to start, but doing so kills fvwm2.  what am

You are destroying a running function.  When ScreenSaver1 returns it
returns to ScreenSaver, but that function no longer exist (a new
function exists, but it may be somewhere else in memory).  Maybe the
memory once used by the first instance of ScreenSaver has been
reclaimed and used for something else.

Jakob

--
Jakob Schiotz                    !  Email: [email-masked]
CAMP, Department of Physics      !  WWW: http://www.fysik.dtu.dk/~schiotz/
Technical University of Denmark  !  
DK-2800 Lyngby, Denmark          !