Skip to content

Commit bbf6464

Browse files
committed
closes #8694 - Fixed gradient not showing when restoring multiple windows, c=workspaces, t=fix
1 parent a710d59 commit bbf6464

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.formal-git/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{type}: {message}, b=({bugId}), c={components}
1+
{bugId} - {message}, c={components}, t={type}

src/zen/workspaces/ZenGradientGenerator.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
) {
2424
return;
2525
}
26+
this.promiseInitialized = new Promise((resolve) => {
27+
this._resolveInitialized = resolve;
28+
});
2629
this.dragStartPosition = null;
2730

2831
ChromeUtils.defineLazyGetter(this, 'panel', () =>
@@ -116,7 +119,8 @@
116119
this.initContextMenu();
117120
this.initPredefinedColors();
118121

119-
this._hasInitialized = true;
122+
this._resolveInitialized();
123+
delete this._resolveInitialized;
120124
this.onDarkModeChange(null);
121125
}
122126

@@ -1102,7 +1106,7 @@
11021106
let workspaceTheme = theme || workspace.theme;
11031107

11041108
await this.foreachWindowAsActive(async (browser) => {
1105-
if (!browser.gZenThemePicker?._hasInitialized) {
1109+
if (browser.closing || (await browser.gZenThemePicker?.promiseInitialized)) {
11061110
return;
11071111
}
11081112
// Do not rebuild if the workspace is not the same as the current one

0 commit comments

Comments
 (0)