diff --git a/src/browser/components/sessionstore/SessionStore-sys-mjs.patch b/src/browser/components/sessionstore/SessionStore-sys-mjs.patch index 92bea6e5d..b5a4911ce 100644 --- a/src/browser/components/sessionstore/SessionStore-sys-mjs.patch +++ b/src/browser/components/sessionstore/SessionStore-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs -index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b30ab5f08 100644 +index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a6376050311377 100644 --- a/browser/components/sessionstore/SessionStore.sys.mjs +++ b/browser/components/sessionstore/SessionStore.sys.mjs @@ -127,6 +127,9 @@ const TAB_EVENTS = [ @@ -211,17 +211,20 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b tabbrowser.removeTab(tabbrowser.tabs[i]); } } -@@ -5821,6 +5851,9 @@ var SessionStoreInternal = { +@@ -5821,6 +5851,12 @@ var SessionStoreInternal = { savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id) ); } ++ if (winData.isZenUnsynced) { ++ aWindow.document.documentElement.setAttribute("zen-unsynced-window", "true"); ++ } + aWindow.gZenFolders?.restoreDataFromSessionStore(winData.folders); + aWindow.gZenViewSplitter?.restoreDataFromSessionStore(winData.splitViewData); + aWindow.gZenWorkspaces?.restoreWorkspacesFromSessionStore(winData); // Move the originally open tabs to the end. if (initialTabs) { -@@ -6372,6 +6405,25 @@ var SessionStoreInternal = { +@@ -6372,6 +6408,25 @@ var SessionStoreInternal = { // Most of tabData has been restored, now continue with restoring // attributes that may trigger external events. @@ -247,7 +250,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b if (tabData.pinned) { tabbrowser.pinTab(tab); -@@ -7290,7 +7342,7 @@ var SessionStoreInternal = { +@@ -7290,7 +7345,7 @@ var SessionStoreInternal = { let groupsToSave = new Map(); for (let tIndex = 0; tIndex < window.tabs.length; ) { @@ -256,7 +259,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b // Adjust window.selected if (tIndex + 1 < window.selected) { window.selected -= 1; -@@ -7305,7 +7357,7 @@ var SessionStoreInternal = { +@@ -7305,7 +7360,7 @@ var SessionStoreInternal = { ); // We don't want to increment tIndex here. continue; diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 8bd1efcac..26d79cc8b 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -118,6 +118,11 @@ class nsZenWorkspaces { window.addEventListener('resize', this.onWindowResize.bind(this)); this.addPopupListeners(); + + if (this.privateWindowOrDisabled) { + await this.#waitForPromises(); + await this.restoreWorkspacesFromSessionStore({}); + } } log(...args) { @@ -133,9 +138,6 @@ class nsZenWorkspaces { }); }; this._pinnedTabsResizeObserver = new ResizeObserver(onResize); - if (this.privateWindowOrDisabled) { - await this.restoreWorkspacesFromSessionStore({}); - } this.registerPinnedResizeObserver(); this.#initializeWorkspaceTabContextMenus(); diff --git a/src/zen/workspaces/zen-workspaces.css b/src/zen/workspaces/zen-workspaces.css index 19b0cbeef..f83138b03 100644 --- a/src/zen/workspaces/zen-workspaces.css +++ b/src/zen/workspaces/zen-workspaces.css @@ -188,6 +188,10 @@ pointer-events: none; } + :root[zen-unsynced-window='true'][zen-sidebar-expanded='true'] & { + padding: calc(-2px + var(--tab-inline-padding) + var(--zen-toolbox-padding)); + } + :root:not([zen-unsynced-window]) & { &:hover, &[open='true'] { @@ -243,7 +247,6 @@ padding: 4px 8px; border-radius: 99px; font-size: 10px; - margin-inline-start: -6px; } }