1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-10 04:25:31 +02:00

Added different transparency modes for macos and stopped initializing workspaces on closed windows

This commit is contained in:
mr. m 2025-02-27 19:06:50 +01:00
parent 7585514868
commit a409016f7a
No known key found for this signature in database
GPG key ID: 419302196C23B258
5 changed files with 66 additions and 20 deletions

View file

@ -512,9 +512,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (typeof this._workspaceEnabled === 'undefined') {
this._workspaceEnabled =
!Services.prefs.getBoolPref('zen.workspaces.disabled_for_testing', false) && this.shouldHaveWorkspaces;
return this._workspaceEnabled;
}
return this._workspaceEnabled;
return this._workspaceEnabled && !window.closed;
}
getActiveWorkspaceFromCache() {
@ -591,6 +590,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
console.error('ZenWorkspaces: Error initializing theme picker', e);
}
this._selectStartPage();
this._fixTabPositions();
}
}
@ -1538,10 +1538,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
}
_moveEmptyTabToWorkspace(workspaceUuid) {
const emptyTab = this._emptyTab;
if (emptyTab) {
this.moveTabToWorkspace(emptyTab, workspaceUuid);
}
this._makeSureEmptyTabIsLast();
}
_makeSureEmptyTabIsLast() {
@ -1552,6 +1549,15 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
container.insertBefore(emptyTab, container.lastChild);
}
}
this._fixTabPositions();
}
_fixTabPositions() {
// Fix tabs _tPos values relative to the actual order
const tabs = gBrowser.tabs;
for (let i = 0; i < tabs.length; i++) {
tabs[i]._tPos = i;
}
}
_updateMarginTopPinnedTabs(arrowscrollbox, pinnedContainer) {