Compare commits

..

4 Commits

9 changed files with 45 additions and 22 deletions

View File

@@ -20,7 +20,6 @@ finish-args:
- --socket=cups
- --persist=.zen
- --env=DICPATH=/usr/share/hunspell
- --filesystem=xdg-config/gtk-3.0:ro
- --filesystem=xdg-download:rw
- --filesystem=/run/.heim_org.h5l.kcm-socket
- --filesystem=xdg-run/speech-dispatcher:ro

View File

@@ -148,7 +148,7 @@ function SignAndPackage($name) {
$env:WIN32_REDIST_DIR="$PWD\win-cross\vs2022\VC\Redist\MSVC\14.38.33135\x64\Microsoft.VC143.CRT"
}
$env:MAR="..\\build\\winsign\\mar.exe"
$env:MAR="..\\build\\windows\\mar.exe"
if ($name -eq "arm64") {
$env:SURFER_COMPAT="aarch64"
} else {

View File

@@ -627,6 +627,11 @@
gZenWorkspaces
.changeWorkspaceShortcut(isNearLeftEdge ? -1 : 1, false, /* Disable wrapping */ true)
.then((spaceChanged) => {
if (AppConstants.platform !== "macosx") {
// See the hack in #createDragImageForTabs for more details which
// explains why we need to do this on non-macOS platforms.
return;
}
let tabs = this.originalDragImageArgs[0].children;
const { isDarkMode, isExplicitMode } =
gZenThemePicker.getGradientForWorkspace(spaceChanged);
@@ -968,13 +973,15 @@
(possibleFolderElement.collapsed ||
possibleFolderElement.childGroupsAndTabs.length < 2)));
if (
isTabGroupLabel(draggedTab) &&
draggedTab.group?.isZenFolder &&
(isTab(dropElement) || dropElement.hasAttribute("split-view-group")) &&
(!dropElement.pinned || dropElement.hasAttribute("zen-essential"))
(isTabGroupLabel(draggedTab) &&
draggedTab.group?.isZenFolder &&
(isTab(dropElement) || dropElement.hasAttribute("split-view-group")) &&
(!dropElement.pinned || dropElement.hasAttribute("zen-essential"))) ||
showIndicatorUnderNewTabButton
) {
dropElement = null;
this.clearDragOverVisuals();
return null;
return [dropElement, dropBefore];
}
if (
isTab(dropElement) ||
@@ -989,7 +996,7 @@
let top = 0;
threshold =
Services.prefs.getIntPref("browser.tabs.dragDrop.moveOverThresholdPercent") / 100;
if (overlapPercent > threshold) {
if (overlapPercent > threshold || showIndicatorUnderNewTabButton) {
top = Math.round(rect.top + rect.height) + "px";
dropBefore = false;
} else {

View File

@@ -1116,9 +1116,7 @@ class nsZenKeyboardShortcutsVersioner {
"N",
"",
ZEN_OTHER_SHORTCUTS_GROUP,
AppConstants.platform === "win"
? nsKeyShortcutModifiers.fromObject({ alt: true })
: nsKeyShortcutModifiers.fromObject({ accel: true, alt: true }),
nsKeyShortcutModifiers.fromObject({ accel: true, shift: true }),
"cmd_zenNewNavigatorUnsynced",
"zen-new-unsynced-window-shortcut"
)

View File

@@ -205,7 +205,7 @@ export class nsZenSessionManager {
// object will always be empty after migration because we haven't
// gotten the opportunity to save the session yet.
if (this._shouldRunMigration) {
this.#runStateMigration(initialState);
initialState = this.#runStateMigration(initialState);
}
// If there are no windows, we create an empty one. By default,
// firefox would create simply a new empty window, but we want
@@ -215,7 +215,11 @@ export class nsZenSessionManager {
if (!initialState?.windows?.length) {
this.log("No windows found in initial state, creating an empty one");
initialState ||= {};
initialState.windows = this._shouldRunMigration ? [] : [{}];
initialState.windows = [
{
tabs: [],
},
];
}
// When we don't have browser.startup.page set to resume session,
// we only want to restore the pinned tabs into the new windows.
@@ -295,6 +299,14 @@ export class nsZenSessionManager {
this.log("Restoring tabs from last closed normal window");
}
}
if (!initialState?.windows?.length) {
initialState ||= {};
initialState.windows = [
{
tabs: [],
},
];
}
for (const winData of initialState?.windows || []) {
winData.spaces = this._migrationData?.spaces || [];
if (winData.tabs) {
@@ -312,6 +324,7 @@ export class nsZenSessionManager {
// Save the state to the sidebar object so that it gets written
// to the session file.
delete this._migrationData;
return initialState;
}
/**

View File

@@ -10,7 +10,6 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
TabStateFlusher: "resource:///modules/sessionstore/TabStateFlusher.sys.mjs",
// eslint-disable-next-line mozilla/valid-lazy
ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
@@ -21,7 +20,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
XPCOMUtils.defineLazyPreferenceGetter(lazy, "gWindowSyncEnabled", "zen.window-sync.enabled");
XPCOMUtils.defineLazyPreferenceGetter(lazy, "gShouldLog", "zen.window-sync.log", true);
const OBSERVING = ["browser-window-before-show"];
const OBSERVING = ["browser-window-before-show", "sessionstore-windows-restored"];
const INSTANT_EVENTS = ["SSWindowClosing"];
const UNSYNCED_WINDOW_EVENTS = ["TabOpen"];
const EVENTS = [
@@ -148,9 +147,6 @@ class nsZenWindowSync {
for (let topic of OBSERVING) {
Services.obs.addObserver(this, topic);
}
lazy.SessionStore.promiseAllWindowsRestored.then(() => {
this.#onSessionStoreInitialized();
});
}
uninit() {
@@ -297,6 +293,10 @@ class nsZenWindowSync {
this.#onWindowBeforeShow(aSubject);
break;
}
case "sessionstore-windows-restored": {
this.#onSessionStoreInitialized();
break;
}
}
}

View File

@@ -565,6 +565,12 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
currentEssenialContainer.essentialsPromo.remove();
}
movingTabs = movingTabs.filter((tab) =>
gBrowser.isTabGroupLabel(tab)
? tab.group?.isZenFolder && !tabsTarget && !essentialTabsTarget
: true
);
// TODO: Solve the issue of adding a tab between two groups
// Remove group labels from the moving tabs and replace it
// with the sub tabs

View File

@@ -155,8 +155,8 @@
/* Mark workspaces indicator */
.zen-current-workspace-indicator {
--indicator-gap: var(--toolbarbutton-inner-padding);
padding: calc(3px + var(--tab-inline-padding) + var(--zen-toolbox-padding));
--indicator-gap: calc(var(--toolbarbutton-inner-padding) - 1px);
padding: calc(2px + var(--tab-inline-padding) + var(--zen-toolbox-padding));
font-weight: 500;
position: relative;
max-height: var(--zen-workspace-indicator-height);
@@ -231,7 +231,7 @@
@media (-moz-platform: windows) {
& img {
margin-bottom: -4px;
margin-bottom: -2px;
}
}
}

View File

@@ -20,7 +20,7 @@
"brandShortName": "Zen",
"brandFullName": "Zen Browser",
"release": {
"displayVersion": "1.18b",
"displayVersion": "1.18.1b",
"github": {
"repo": "zen-browser/desktop"
},