Subject: CVS migo: * Restart command now has 3 forms (no special cases):

From: CVS <[email-masked]>
Date: Fri, 18 Jun 1999 18:02:53 -0500 (CDT)

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	migo	99/06/18 18:02:53

Modified files:
	.              : ChangeLog 
	fvwm           : fvwm.c fvwm2.1 

Log message:
* Restart command now has 3 forms (no special cases):
+ Restart
+ Restart wm with optional arguments
+ Restart --pass-args wm
Only the first form respects a session manager. Matthias?
* .fvwm_restart renamed (will be removed) to .fvwm_restart.last after usage.

--
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: Matthias Clasen <[email-masked]>
Date: Sat, 19 Jun 1999 01:17:23 +0200

Mikhael, 
I found this in the ChangeLog:

        Removed all references to "-restore".

        (InitVariables): calling LoadWindowStates, LoadGlobalState only
        on Restarting.
 
Have you actually tried this with a session manager ?! I guess SM is
totally broken now. -restore was there for a reason, namely to give the
SM a way to tell fvwm what session to restore. You have removed that
part from the SmRestartCommand... LoadWindowStates and LoadGlobalState
must always be called with the filename received via -restore in order
to make SM work. 

Matthias

-- 
Matthias Clasen, 
Tel. 0761/203-5606
Email: [email-masked]
Mathematisches Institut, Albert-Ludwigs-Universitaet Freiburg
--
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: Mikhael Goikhman <[email-masked]>
Date: Sat, 19 Jun 1999 02:32:00 +0300 (IDT)

> must always be called with the filename received via -restore in order

If something is broken, it will be restored.
I remember it was your suggestion to remove "-restore" option (file-name
is hardcoded to ~/.fvwm_restart) and determine Restarting in other way
(using _XA_WM_DESKTOP).

It seems logically. Is this really broken?

Regards,
Mikhael.

---

From: Matthias Clasen <[email-masked]>
Date: Sat, 19 Jun 1999 19:16:11 +0200

> is hardcoded to ~/.fvwm_restart) and determine Restarting in other way

Well, I suggested that -restore is not needed for restarting, I didn't 
mean that it should be removed completely.  

The session management protocol is very explicit about the fact that
a client is not allowed to reuse the last session save file, thus we can't
use a fixed name like ".fvwm_restart" for session saves. Instead we have
to use a fresh filename created via tempnam(). After creating this fresh
file fvwm (used to) tell the sm about the new file via SmRestartCommand.
(the last two arguments were "-restore" filename). the session manager
would then restart fvwm with the proper -restore argument.

The reason why we can't reuse the old file is that a session manager may
allow multiple named sessions and thus he is the only one who knows
if the old file is still be needed (eg xsm allows you to start session "foo"
and later save the current state as "bar").

Thus my proposal for reverting the changes is: 

Reintroduce -restore, set the restore_filename from the following arg,
and only override restore_filename to the fixed ".fvwm_restart" if 
we have determined (via _WM_DESKTOP) that we are "Restart"ing. Then call
LoadWindowStates() and LoadGlobalState() unconditionally. And don't forget
to reintroduce the last two arguments to SmRestartCommand.

Matthias

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 20 Jun 1999 00:31:59 +0300 (IDT)

> mean that it should be removed completely.

Sorry :( This was a misunderstanding.

> to reintroduce the last two arguments to SmRestartCommand.

I will do this in the nearest time. And this time I will test that with a
session manager.

Regards,
Mikhael.

---

From: Matthias Clasen <[email-masked]>
Date: Sat, 19 Jun 1999 23:37:45 +0200

> Sorry :( This was a misunderstanding.

I should have been clearer.

> I will do this in the nearest time. And this time I will test that with a
 
Thanks a lot.