Subject: FVWM: no rc file startup problem solved

From: <[email-masked]> (Charles Hines)
Date: Thu, 25 Apr 1996 14:58:10 -0400

Ok, figured out what the problem is w/ the no rc file startup problem,
thanks to Keith Carter (I think that's who it was) describing it's
behavior slightly differently.  It triggered a little thought in my
head, and the problem was then easy to find.  It'll be fixed in the
next release.

Here's the patch, in case anyone is interested.  It should apply ok
against 2.0.42.

Chuck

----------------------------------------------------------------------
--- ../../fvwm-2.0.42/fvwm/fvwm.c       Thu Apr 11 10:52:19 1996
+++ ./fvwm.c    Thu Apr 25 13:47:06 1996
@@ -124,6 +124,7 @@
   char message[255];
   Bool single = False;
   Bool option_error = FALSE;
+  MenuRoot *mr;

   g_argv = argv;
   g_argc = argc;
@@ -355,6 +356,22 @@
   DBUG("main","Running config_command...");
   ExecuteFunction(config_command, NULL,&Event,C_ROOT,-1);
   DBUG("main","Done running config_command");
+
+  CaptureAllWindows();
+  MakeMenus();
+
+  if(Restarting)
+  {
+    mr = FindPopup("RestartFunction");
+    if(mr != NULL)
+      ExecuteFunction("Function RestartFunction",NULL,&Event,C_ROOT,-1);
+  }
+  else
+  {
+    mr = FindPopup("InitFunction");
+    if(mr != NULL)
+      ExecuteFunction("Function InitFunction",NULL,&Event,C_ROOT,-1);
+  }

   if(Scr.d_depth<2)
   {

--- ../../fvwm-2.0.42/fvwm/read.c       Fri Mar 22 15:33:21 1996
+++ ./read.c    Thu Apr 25 13:46:48 1996
@@ -42,7 +42,6 @@
   FILE *fd;
   int thisfileno;
   extern Bool Restarting;
-  MenuRoot *mr;
   extern XEvent Event;

   thisfileno = numfilesread;
@@ -123,24 +122,6 @@
       tline = fgets(line,(sizeof line)-1,fd);
     }
   fclose(fd);
-  if(thisfileno == 0)
-    {
-      CaptureAllWindows();
-      MakeMenus();
-
-      if(Restarting)
-       {
-         mr = FindPopup("RestartFunction");
-         if(mr != NULL)
-           ExecuteFunction("Function RestartFunction",NULL,&Event,C_ROOT,-1);
-       }
-      else
-       {
-         mr = FindPopup("InitFunction");
-         if(mr != NULL)
-           ExecuteFunction("Function InitFunction",NULL,&Event,C_ROOT,-1);
-       }
-    }
 }

--
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: まつしたまこと <[email-masked]>
Date: Mon, 29 Apr 1996 18:50:19 +0900

chuck_hines> Ok, figured out what the problem is w/ the no rc file
chuck_hines> startup problem, thanks to Keith Carter (I think that's
chuck_hines> who it was) describing it's behavior slightly
chuck_hines> differently.

I've just received information that this patch causes another problem.

That is, "If you invoke fvwm with FvwmM4 (and maybe FvwmCpp), no
evaluation of Initfunction or RestartFunction will do".

chuck_hines> It'll be fixed in the next release.

Stop including this patch directly...

- -
Makoto `MAR_kun' MATSUSHITA