On 05.03.2012 20:27 (UTC+1), Brad Jorsch wrote:
On Sun, Mar 04, 2012 at 10:55:40AM +0100, Rainer Hurling wrote:

--- src/startup.c.orig  2012-02-14 20:36:01.000000000 +0100
+++ src/startup.c       2012-03-04 08:29:04.000000000 +0100
@@ -761,9 +761,10 @@
                wMenuRestoreState(wScreen[j]);

                /* If we're not restarting, restore session */
-               if (wPreferences.flags.restarting == 0&&  
!wPreferences.flags.norestore)
+               if (wPreferences.flags.restarting == 0&&  
!wPreferences.flags.norestore) {
                        wSessionRestoreState(wScreen[j]);
-
+                       wmessage("restarting: %d, norestore: %d\n", 
wPreferences.flags.restarting, wPreferences.flags.norestore);
+                       }
                if (!wPreferences.flags.noautolaunch) {
                        /* auto-launch apps */
                        if (!wPreferences.flags.nodock&&  wScreen[j]->dock) {

First I should say that I am only an interested user, but not a real developer or C programmer.

This is rather useless, as it will always print "restarting: 0,
norestore: 0" since any other values will cause it to not reach the
wmessage line. Don't include the wmessage call within the if block.

Yes, that makes sense, thank you. I detached it from the if block.

When starting wmaker, some of these wmessages write onto the
console. I summarized them in the following lines:

It would be best to just post the entire wmaker-related portion of the
log, instead of trying to summarize.

My "summarizing" only means, that I removed some messages from Xorg and xscreensaver ...

/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: (null)
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: (null)
/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real
/usr/local/bin/wmaker(real_main(main.c:632)): Got --for-real, set
restarting = 0

I guess this is from the initial run? But where is the log entry from
startup.c?

No idea :(

/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: (null)
/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real=
/usr/local/bin/wmaker(real_main(main.c:635)): Got --for-real=, set
restarting = 1
/usr/local/bin/wmaker(StartUp(startup.c:766)): norestore: 0

And then here you picked "Restart" from the menu, or else wmaker
crashed? But that log entry from startup.c doesn't match what should be
produced from the patch you attached.

We discussed that outside this thread. You are right, that was a mistake. When I created this line I only had norestore in the patch, sorry.

Lines like this are only created on startup of wmaker. When I try to
save a session, clear a session or restart wmaker, nothing happens
any more with our wmessages.

Err, you should get messages when you restart wmaker. Unless somehow the
restart is picking up a different wmaker binary (e.g. /usr/bin instead
of /usr/local/bin or something).

With the new runs I get messages when restarting, see below, please.

There should be only one binary for wmaker, as far as I can see:
#whereis wmaker
wmaker: /usr/local/bin/wmaker /usr/local/man/man1/wmaker.1x.gz


I repeated starting, saving, restarting, clearing and leaving wmaker, which gives me the following output:

# ------------------------------------------------------------------
# First run with fresh wmaker.inst: save session when leaving
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real
/usr/local/bin/wmaker(real_main(main.c:632)): Got --for-real, set restarting = 0
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real=
/usr/local/bin/wmaker(real_main(main.c:635)): Got --for-real=, set restarting = 1
/usr/local/bin/wmaker(StartUp(startup.c:767)): restarting: 1, norestore: 0

# ------------------------------------------------------------------
# 2. run: save session from menu, then leaving without saving
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real
/usr/local/bin/wmaker(real_main(main.c:632)): Got --for-real, set restarting = 0
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real=
/usr/local/bin/wmaker(real_main(main.c:635)): Got --for-real=, set restarting = 1
/usr/local/bin/wmaker(StartUp(startup.c:767)): restarting: 1, norestore: 0

# ------------------------------------------------------------------
# 3. run: clear session from menu, no saving
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real
/usr/local/bin/wmaker(real_main(main.c:632)): Got --for-real, set restarting = 0
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real=
/usr/local/bin/wmaker(real_main(main.c:635)): Got --for-real=, set restarting = 1
/usr/local/bin/wmaker(StartUp(startup.c:767)): restarting: 1, norestore: 0

# ------------------------------------------------------------------
# 4. run: restarting wmaker from menu, then leaving
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real
/usr/local/bin/wmaker(real_main(main.c:632)): Got --for-real, set restarting = 0
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real=
/usr/local/bin/wmaker(real_main(main.c:635)): Got --for-real=, set restarting = 1
/usr/local/bin/wmaker(StartUp(startup.c:767)): restarting: 1, norestore: 0

/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real=
/usr/local/bin/wmaker(real_main(main.c:635)): Got --for-real=, set restarting = 1
/usr/local/bin/wmaker(StartUp(startup.c:767)): restarting: 1, norestore: 0

# ------------------------------------------------------------------
# 5. run: save session from menu, then restart, then save when leaving
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real
/usr/local/bin/wmaker(real_main(main.c:632)): Got --for-real, set restarting = 0
/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real=
/usr/local/bin/wmaker(real_main(main.c:635)): Got --for-real=, set restarting = 1
/usr/local/bin/wmaker(StartUp(startup.c:767)): restarting: 1, norestore: 0

/usr/local/bin/wmaker(main(main.c:550)): restarting: 0, norestore: 0

/usr/local/bin/wmaker(main(main.c:552)): Arg 1 is --for-real=
/usr/local/bin/wmaker(real_main(main.c:635)): Got --for-real=, set restarting = 1
/usr/local/bin/wmaker(StartUp(startup.c:767)): restarting: 1, norestore: 0


Most of this is very similar. The only real difference I see when restarting the session from within wmaker.

Thanks for your patience,
Rainer


--
To unsubscribe, send mail to [email protected].

Reply via email to