fix: Fixed private windows adopting Blank windows styling, b=closes #12211, c=no-component

This commit is contained in:
mr. m
2026-02-02 18:23:25 +01:00
parent a72fa3f79e
commit ead077d16e

View File

@@ -15,6 +15,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
TabStateCache: "resource:///modules/sessionstore/TabStateCache.sys.mjs",
setTimeout: "resource://gre/modules/Timer.sys.mjs",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
});
XPCOMUtils.defineLazyPreferenceGetter(lazy, "gWindowSyncEnabled", "zen.window-sync.enabled", true);
@@ -189,6 +190,10 @@ class nsZenWindowSync {
// to avoid confusing the old private window behavior.
let forcedSync = !aWindow.gZenWorkspaces?.privateWindowOrDisabled;
let hasUnsyncedArg = false;
// See issue https://github.com/zen-browser/desktop/issues/12211
if (lazy.PrivateBrowsingUtils.isWindowPrivate(aWindow)) {
aWindow._zenStartupSyncFlag = "synced";
}
if (aWindow._zenStartupSyncFlag === "synced") {
forcedSync = true;
} else if (aWindow._zenStartupSyncFlag === "unsynced") {