diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index c6677060f..ca11763ec 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -204,7 +204,6 @@ pref('zen.startup.smooth-scroll-in-tabs', true); pref('zen.workspaces.hide-default-container-indicator', true); pref('zen.workspaces.force-container-workspace', false); pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', false); -pref('zen.workspaces.show-workspace-indicator', true); pref('zen.workspaces.swipe-actions', true); pref('zen.workspaces.wrap-around-navigation', true); pref('zen.workspaces.natural-scroll', false); @@ -293,6 +292,8 @@ pref('image.jxl.enabled', true, locked); pref("svg.context-properties.content.enabled", true); pref("image.avif.enabled", true, locked); +pref("media.eme.enabled", true); + // Smooth scrolling #ifndef XP_MACOSX pref("apz.overscroll.enabled", true); diff --git a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch index 81c94281a..1200298e4 100644 --- a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch +++ b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs -index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8d1a80e97fa711352d4b725f2d299a073dbae4db 100644 +index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..f001ffe262b26389c5af68e29d0785500969c344 100644 --- a/browser/components/urlbar/UrlbarInput.sys.mjs +++ b/browser/components/urlbar/UrlbarInput.sys.mjs @@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter( @@ -93,7 +93,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8d1a80e97fa711352d4b725f2d299a07 + if (lazy.ZEN_URLBAR_BEHAVIOR == 'float' || (lazy.ZEN_URLBAR_BEHAVIOR == 'floating-on-type' && !this.focusedViaMousedown)) { + this.setAttribute("zen-floating-urlbar", "true"); + // Divide the window by 2 and subtract the urlbar height to get the top -+ this.textbox.style.setProperty("--zen-urlbar-top", `${(this.window.innerHeight / 6)}px`); ++ this.textbox.style.setProperty("--zen-urlbar-top", `${(this.window.innerHeight / 4)}px`); + } else { + this.removeAttribute("zen-floating-urlbar"); + } diff --git a/src/zen/compact-mode/ZenCompactMode.mjs b/src/zen/compact-mode/ZenCompactMode.mjs index ad5218b72..a55cd210c 100644 --- a/src/zen/compact-mode/ZenCompactMode.mjs +++ b/src/zen/compact-mode/ZenCompactMode.mjs @@ -35,11 +35,12 @@ var gZenCompactModeManager = { lazyCompactMode.mainAppWrapper.removeAttribute('zen-compact-mode'); this._wasInCompactMode = isCompactMode; - this.addMouseActions(); this.addContextMenu(); }, init() { + this.addMouseActions(); + Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this)); gZenUIManager.addPopupTrackingAttribute(this.sidebar); @@ -412,20 +413,33 @@ var gZenCompactModeManager = { }, addMouseActions() { + gURLBar.textbox.addEventListener('mouseenter', (event) => { + if (!gZenVerticalTabsManager._hasSetSingleToolbar) { + return; + } + if (event.target.closest('#urlbar[zen-floating-urlbar]')) { + // Ignore sidebar mouse enter if the urlbar is floating + this.clearFlashTimeout('has-hover' + gZenVerticalTabsManager._hasSetSingleToolbar); + window.requestAnimationFrame(() => { + this.sidebar.removeAttribute('zen-has-hover'); + }); + this._hasHoveredUrlbar = true; + return; + } + }); + for (let i = 0; i < this.hoverableElements.length; i++) { let target = this.hoverableElements[i].element; const onEnter = (event) => { - if (event.type === 'mouseenter' && !event.target.matches(':hover')) return; - // Dont register the hover if the urlbar is floating and we are hovering over it - this.clearFlashTimeout('has-hover' + target.id); - if ( - event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') || - this.sidebar.getAttribute('supress-primary-adjustment') === 'true' - ) { - this._hasHoveredUrlbar = this.sidebar.getAttribute('supress-primary-adjustment') !== 'true'; - return; - } - window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true')); + setTimeout(() => { + if (event.type === 'mouseenter' && !event.target.matches(':hover')) return; + // Dont register the hover if the urlbar is floating and we are hovering over it + this.clearFlashTimeout('has-hover' + target.id); + if (this.sidebar.getAttribute('supress-primary-adjustment') === 'true' || this._hasHoveredUrlbar) { + return; + } + window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true')); + }, 0); }; const onLeave = (event) => { @@ -457,7 +471,6 @@ var gZenCompactModeManager = { this.sidebar.getAttribute('supress-primary-adjustment') === 'true' || this._hasHoveredUrlbar ) { - delete this._hasHoveredUrlbar; return; } @@ -499,6 +512,12 @@ var gZenCompactModeManager = { ); } }); + + gURLBar.textbox.addEventListener('mouseleave', (event) => { + setTimeout(() => { + delete this._hasHoveredUrlbar; + }, 0); + }); }, _getCrossedEdge(posX, posY, element = document.documentElement, maxDistance = 10) { diff --git a/src/zen/tabs/ZenPinnedTabManager.mjs b/src/zen/tabs/ZenPinnedTabManager.mjs index 0e3d3835c..9a056ddd7 100644 --- a/src/zen/tabs/ZenPinnedTabManager.mjs +++ b/src/zen/tabs/ZenPinnedTabManager.mjs @@ -665,6 +665,8 @@ } else { gBrowser.pinTab(tab); } + tab.setAttribute('zenDefaultUserContextId', true); + ZenWorkspaces.switchTabIfNeeded(tab); this._onTabMove(tab); this.onTabIconChanged(tab); diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 631117d43..bbcfd4cf5 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -799,10 +799,12 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { const currentTab = gBrowser.selectedTab; let showed = false; if (this._tabToRemoveForEmpty) { - this.selectEmptyTab(); - gBrowser.removeTab(this._tabToRemoveForEmpty); + if (gZenVerticalTabsManager._canReplaceNewTab) { + this.selectEmptyTab(); + gBrowser.removeTab(this._tabToRemoveForEmpty); + showed = true; + } delete this._tabToRemoveForEmpty; - showed = true; } else { const currentTabURL = currentTab.linkedBrowser?.currentURI?.spec; // Check for empty tab being restored diff --git a/src/zen/workspaces/zen-workspaces.css b/src/zen/workspaces/zen-workspaces.css index 4a42f09f8..42f806e3a 100644 --- a/src/zen/workspaces/zen-workspaces.css +++ b/src/zen/workspaces/zen-workspaces.css @@ -507,12 +507,6 @@ } } -@media not -moz-pref('zen.workspaces.show-workspace-indicator') { - #zen-current-workspace-indicator-container { - display: none !important; - } -} - #zen-current-workspace-indicator-container[hidden='true'] { display: none !important; }