Subject: FVWM CVS: fvwm hippo

From: CVS <[email-masked]>
Date: Thu, 15 Apr 1999 08:25:17 -0500 (CDT)

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	hippo	99/04/15 08:25:17

Modified files:
	.              : ChangeLog 
	docs           : FAQ 
	fvwm           : fvwm.c fvwm.h module.c 

Log message:
Only wait for modules specified on the command line to finish before capturing
all windows and running InitFunction.  You can call modules directly from your
.fvwm2rc and it won't take ages to start (no need to have them in InitFuncion)

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

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 15 Apr 1999 15:44:12 +0200

> .fvwm2rc and it won't take ages to start (no need to have them in InitFuncion)

Tim, I still didn't really understand what the reason for this delay is
(perhaps I'm not reading mails carefully). Is it some kind of deadlock?
I.e. fvwm waits for the modules to complete their startup and the modules
wait for fvwm's startup?

Bye

Dominik ^_^

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Tim Phipps <[email-masked]>
Date: Thu, 15 Apr 1999 15:54:25 +0100

> I.e. fvwm waits for the modules to complete their startup and the modules

Yes, the delay is there to get you out of deadlock.  I made it large to
annoy people into fixing their configs and to make it work on busy
systems.

In order for FvwmCpp to work relieably fvwm has to wait for it to finish
before decorating the windows.  Since fvwm can't tell if a module is
going to send back config commands (like FvwmCpp) it waits for all
modules to finish. If you start a module directly in your .fvwm2rc (not
from the InitFunction) fvwm will wait for it to finish (if it's
FvwmButtons it won't finish, that's why there is a timeout)

What happens now is that fvwm only waits for modules specified on the
command line to finish before it decorates everything.  You can still
experience the large delay but only by doing "fvwm -f .fvwm2rc -cmd
FvwmButtons".

Cheers,
Tim.

PS Just to see why I did all this try "fvwm -cmd 'Echo hello'" with fvwm
version 2.0.46.  You get a complete deadlock (reset your server if you
can) because fvwm is waiting for the first read to complete (which won't
happen because the only command it will start is 'Echo hello') or read
section 4.3 of the FAQ.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 15 Apr 1999 17:03:54 +0200

> experience the large delay but only by doing "fvwm -f .fvwm2rc -cmd

Duh, isn't there a nicer way to have proper decorations? Couldn't we make
some 'wait_until_i_finished' command that is sent to fvwm by the modules
that need to complete before fvwm starts up? Are there other modules that
have this requirement?

Bye

Dominik ^_^

---

From: Tim Phipps <[email-masked]>
Date: Thu, 15 Apr 1999 16:22:51 +0100

> that need to complete before fvwm starts up? Are there other modules that

No, because fvwm doesn't read anything from any modules before going
into it's event loop so by the time the 'wait_until_i_finished' command
arrives fvwm has already done the decorations.

You can't have a 'decorate_now' command because the first file/module
that had it would cause decorations to happen and what you really want
is the last 'decorate_now'.  The only way to detect the last
'decorate_now' command is to wait for all sources of config commands to
fvwm to finish, in which case you don't need a 'decorate_now' command,
you just assume it when everything finishes.

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 15 Apr 1999 17:33:09 +0200

> you just assume it when everything finishes.

Then perhaps we could hard code FvwmCpp and FvwmM4 as a last resort.
Those two modules are probably never renamed (why should you). Or are
there more modules that require this?

Bye

Dominik ^_^

---

From: Jason L Tibbitts III <[email-masked]>
Date: 15 Apr 1999 12:18:49 -0500

>>>>> "TP" == Tim Phipps <[email-masked]> writes:

TP> Since fvwm can't tell if a module is going to send back config commands
TP> (like FvwmCpp) it waits for all modules to finish.

This suggests a possible solution: let the module tell fvwm what it
intends to do (i.e. a "wait for me" indicator).  But I'm not really
knowledgeable in ways of the module interface, so this could be
impossible.

Alternately, let the fvwmrc file indicate what modules to wait for
decorations from.  Or is that a chicken and egg problem?

 - J<

---

From: Tomas Ogren <[email-masked]>
Date: Thu, 15 Apr 1999 19:40:33 +0200

> decorations from.  Or is that a chicken and egg problem?

Dinosaurs laid eggs before the chickens were around, problem solved.

/Tomas
-- 
Tomas Ögren, [email-masked], http://www.ing.umu.se/~stric/
|- Student at Computing Science, University of Umeå
`- Sysadmin at {cs,ing,acc}.umu.se
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Tim Phipps <[email-masked]>
Date: Fri, 16 Apr 1999 09:27:25 +0100

> knowledgeable in ways of the module interface, so this could be
It is impossible without adding to the module protocol to require fvwm
to wait for each module it starts to send back a wait/dont_wait
indicator.  This would slow things down and you still have the
possibility of deadlock if a module doesn't follow the protocol.
> decorations from.  Or is that a chicken and egg problem?
It's a problem in situations where fvwm is installed in a way that it
reads a site wide setup file and then a user defined file.

Cheers,
Tim.

---

From: Tim Phipps <[email-masked]>
Date: Fri, 16 Apr 1999 09:36:17 +0100

> there more modules that require this?

We could but I think that is ugly and unnecesary.  I think we should go
with what we have and see how many people complain because they start
fvwm with:

fvwm -f .fvwm2rc -cmd FvwmButtons

These are the only people that are going to get the 42 second delay and
my guess is that there isn't anyone.

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 16 Apr 1999 18:03:42 +0200

> my guess is that there isn't anyone.

Ah, I must have misunderstood something in an earlier mail. I thought
you stil couldn't start modules outside InitFunc. In the present state
it works and I really don't care for command line arguments.

Bye

Dominik ^_^

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