Commit 53f45bbf authored by Michael Catanzaro's avatar Michael Catanzaro

Fix failure to launch any window on startup

If we have an empty session state file, a file that exists on disk but
contains no windows, then nothing happens when we start Epiphany until
the user manually deletes the file from disk. That's bad. Show a window.

(cherry picked from commit a9ee1d2e)
parent b95e6178
......@@ -30,6 +30,7 @@
#include "ephy-gui.h"
#include "ephy-header-bar.h"
#include "ephy-history-dialog.h"
#include "ephy-link.h"
#include "ephy-lockdown.h"
#include "ephy-notification.h"
#include "ephy-prefs.h"
......@@ -125,6 +126,9 @@ ephy_shell_startup_continue (EphyShell *shell,
/* since session autoresume will open one for us. */
ephy_shell_open_uris (shell, (const char **)ctx->arguments,
ctx->startup_mode, ctx->user_time);
} else if (ephy_shell_get_n_windows (shell) == 0) {
EphyWindow *window = ephy_window_new ();
ephy_link_open (EPHY_LINK (window), NULL, NULL, EPHY_LINK_HOME_PAGE);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment