Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/widget/cocoa/nsCocoaWindow-mm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
index 3e58a40d747fb3e05bd67518b41b6467725cfe42..995419b6390e8abe663f71f8fb26281eae56aa84 100644
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -5329,6 +5329,9 @@ static unsigned int WindowMaskForBorderStyle(BorderStyle aBorderStyle) {
case nsIWidget::eDocumentWindowAnimation:
behavior = NSWindowAnimationBehaviorDocumentWindow;
break;
+ case nsIWidget::eZenUtilityWindowAnimation:
+ behavior = NSWindowAnimationBehaviorUtilityWindow;
+ break;
default:
MOZ_FALLTHROUGH_ASSERT("unexpected mAnimationType value");
case nsIWidget::eGenericWindowAnimation:
12 changes: 12 additions & 0 deletions src/widget/nsIWidget-h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h
index 4a5d933d865585ea772bafd233f7d4ebce3ac02b..3eae20d579330a71196c83eeb20d8fb2cd9f5fae 100644
--- a/widget/nsIWidget.h
+++ b/widget/nsIWidget.h
@@ -1118,6 +1118,7 @@ class nsIWidget : public nsSupportsWeakReference {
virtual void SetSupportsNativeFullscreen(bool aSupportsNativeFullscreen) {}

enum WindowAnimationType {
+ eZenUtilityWindowAnimation,
eGenericWindowAnimation,
eDocumentWindowAnimation
};
Comment on lines +8 to +12
13 changes: 11 additions & 2 deletions src/xpfe/appshell/AppWindow-cpp.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
diff --git a/xpfe/appshell/AppWindow.cpp b/xpfe/appshell/AppWindow.cpp
index d980bca7b42bb8d81817756215067771d2793bfe..94992e9d96348e4c88e089e4cdc3234076efb656 100644
index d980bca7b42bb8d81817756215067771d2793bfe..06818048ce6752a8b55faa3144c934fadbc46a68 100644
--- a/xpfe/appshell/AppWindow.cpp
+++ b/xpfe/appshell/AppWindow.cpp
@@ -1847,7 +1847,7 @@ nsresult AppWindow::MaybeSaveEarlyWindowPersistentValues(
@@ -1564,6 +1564,8 @@ void AppWindow::SyncAttributesToWidget() {
windowElement->GetAttribute(u"macanimationtype"_ns, attr);
if (attr.EqualsLiteral("document")) {
mWindow->SetWindowAnimationType(nsIWidget::eDocumentWindowAnimation);
+ } else if (attr.EqualsLiteral("zen:utilities")) {
+ mWindow->SetWindowAnimationType(nsIWidget::eZenUtilityWindowAnimation);
}

// Check if the client size did change and if we want to restore it.
@@ -1847,7 +1849,7 @@ nsresult AppWindow::MaybeSaveEarlyWindowPersistentValues(
}
}

Expand Down
18 changes: 3 additions & 15 deletions src/zen/boosts/ZenBoostsManager.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -640,21 +640,10 @@ class nsZenBoostsManager {
}
}

const editor = Services.ww.openWindow(
parentWindow,
const editor = parentWindow.openDialog(
"chrome://browser/content/zen-components/windows/zen-boost-editor.xhtml",
null,
`left=${left},top=${top},chrome,alwaysontop,resizable=no,minimizable=no,dependent,dialog=yes`,
null
);

// Close the editor if the tab is switched
parentWindow.gBrowser.tabContainer.addEventListener(
"TabSelect",
editor.close.bind(editor),
{
once: true,
}
"",
`left=${left},top=${top},chrome,alwaysontop,resizable=no,minimizable=no,dependent,dialog=yes`
);
Comment on lines +643 to 647

const progressListener = {
Expand All @@ -671,7 +660,6 @@ class nsZenBoostsManager {
// Give the domain
editor.domain = domain;
editor.openerWindow = parentWindow;
editor.focus();

// Make boost active
this.makeBoostActiveForDomain(domain, boost.id);
Expand Down
2 changes: 1 addition & 1 deletion src/zen/boosts/zen-boost-editor.inc.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
customtitlebar="true"
sizemode="normal"
scrolling="false"
macanimationtype="document"
macanimationtype="zen:utilities"
windowsmica="true"
data-l10n-sync="true">
<head>
Expand Down
2 changes: 1 addition & 1 deletion src/zen/urlbar/ZenSiteDataPanel.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -887,8 +887,8 @@ export class nsZenSiteDataPanel {
domain,
boostId
);
lazy.gZenBoostsManager.openBoostWindow(this.window, boost, uri);
this.unifiedPanel.hidePopup();
lazy.gZenBoostsManager.openBoostWindow(this.window, boost, uri);
break;
}
}
Expand Down
Loading