From 4d05367f1dc13eae463aa947eccc33409152b6ff Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Fri, 5 Apr 2024 18:41:33 +0800 Subject: [PATCH] Fix progress window title bar on win and linux (#3915) --- chrome/content/zotero/progressWindow.xhtml | 5 +++++ chrome/content/zotero/titlebar.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/progressWindow.xhtml b/chrome/content/zotero/progressWindow.xhtml index a61f115663..4ef8e574d9 100644 --- a/chrome/content/zotero/progressWindow.xhtml +++ b/chrome/content/zotero/progressWindow.xhtml @@ -33,6 +33,8 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" title="&zotero.progress.title;" + no-titlebar-icon="true" + drawintitlebar-platforms="win,linux" width="300" windowtype="alert:alert"> @@ -42,6 +44,9 @@ diff --git a/chrome/content/zotero/titlebar.js b/chrome/content/zotero/titlebar.js index 455a0bbb9b..835025e204 100644 --- a/chrome/content/zotero/titlebar.js +++ b/chrome/content/zotero/titlebar.js @@ -52,7 +52,7 @@ window.addEventListener("load", function () { window.document.documentElement.setAttribute('sizemode', 'normal'); } - if (Zotero.isWin) { + if (Zotero.isWin && !document.querySelector("window")?.hasAttribute("no-titlebar-icon")) { let windowIcon = document.querySelector(".titlebar-icon"); // Simulate Windows window control windowIcon.addEventListener("dblclick", (ev) => {