[epiphany] session: Fix saving of multiple windows
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] session: Fix saving of multiple windows
- Date: Tue, 29 Mar 2016 18:23:17 +0000 (UTC)
commit 019ac9b9fe0b9e1b4b0f834a071dd6f8c63ba956
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed Mar 23 20:23:29 2016 -0500
session: Fix saving of multiple windows
This regressed when we changed ephy_session_close to always save the
session, even if a save was already in progress. In general that is
fine, but it's broken in case a close has already occurred. The problem
is that we actually close twice: once in ephy_shell_close_all_windows,
and then again once for the last window in ephy_window_close. When
closing the last window, other windows have already been closed, and
therefore do not get saved. We need to keep the check here though, to
keep session save working in the general case when closing a single
window with the close button or Ctrl+W, where
ephy_shell_close_all_windows never gets called. So the easiest way to
fix this is to simply tolerate multiple calls to ephy_session_close, and
bail early if the session was already closed; this ensures that we do
not clobber the session state file when closing the final window if the
session was closed by ephy_shell_close_all_windows.
https://bugzilla.gnome.org/show_bug.cgi?id=764101
src/ephy-session.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index f836053..ce3438a 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -523,6 +523,9 @@ ephy_session_close (EphySession *session)
session->save_source_id = 0;
}
+ if (session->closing)
+ return;
+
session->closing = TRUE;
policy = g_settings_get_enum (EPHY_SETTINGS_MAIN, EPHY_PREFS_RESTORE_SESSION_POLICY);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]