Comment 34 for bug 13214

Revision history for this message
In , Dan Winship (danw-gnome) wrote :

> The problem is, is there anyone else who knows the GNOME session API
> very well? :)

Hi. :)

You don't need to call gnome_client_set_restart_style. GNOME_RESTART_IF_RUNNING
is the default. (The GNOME docs don't say this, but GnomeClient is just a tiny
wrapper over XSMP, and the XSMP docs do say that.)

Calling gnome_client_set_restart_command() IS the correct fix for your bug.
However, since the restart command is constant for any given session, you don't
need to run it each time save_yourself_cb() runs. Just call it once from
nsNativeAppSupportUnix::Start() right after you connect to the client signals.

You should probably also do:

    if (!shutdown)
        return;

at the very top of save_yourself_cb, because Firefox isn't really set up to
deal with the user saving the session without logging out and then expecting
to be able to resume that particular saved session an arbitrary number of times
after that).