diff --git a/src/zen/sessionstore/ZenSessionManager.sys.mjs b/src/zen/sessionstore/ZenSessionManager.sys.mjs index 350bbfc43..a559ccf2a 100644 --- a/src/zen/sessionstore/ZenSessionManager.sys.mjs +++ b/src/zen/sessionstore/ZenSessionManager.sys.mjs @@ -543,6 +543,10 @@ export class nsZenSessionManager { this.#restoreWindowData(newWindow); } newWindow.tabs = this.#filterUnusedTabs(newWindow.tabs || []); + if (!lazy.gWindowSyncEnabled) { + // Don't bring over any unpinned tabs if window sync is disabled. + newWindow.tabs = newWindow.tabs.filter((tab) => tab.pinned); + } // These are window-specific from the previous window state that // we don't want to restore into the new window. Otherwise, new diff --git a/src/zen/sessionstore/ZenWindowSync.sys.mjs b/src/zen/sessionstore/ZenWindowSync.sys.mjs index 59e27f9eb..9e6d5ddad 100644 --- a/src/zen/sessionstore/ZenWindowSync.sys.mjs +++ b/src/zen/sessionstore/ZenWindowSync.sys.mjs @@ -1087,7 +1087,7 @@ class nsZenWindowSync { } tab._zenContentsVisible = true; tab.id = this.#newTabSyncId; - if (isUnsyncedWindow) { + if (isUnsyncedWindow || !lazy.gWindowSyncEnabled) { return; } this.#runOnAllWindows(window, (win) => {