From ad9604e267e3bc3635aa215632a530e93f4e791b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 24 Mar 2020 17:30:42 -0400 Subject: [PATCH] Don't use 'dialog=no' or 'modal' for preferences window Since at least 2009, for reasons unclear, we've used `dialog=no` when `instantApply` is true (macOS/Linux) and `modal` (with implicit `dialog=yes`) when false (Windows). `dialog=no` doesn't seem to have an effect on macOS, and `modal` doesn't seem to have an effect on Windows (at least with `openDialog()`), but on Linux `dialog=no` allows the dialog to be resized, which it shouldn't be, and causes problems with a tiling window manager. This change switches to the implicit `dialog=yes` on all platforms. (On Linux, this also centers the dialog on the screen, keeps it in front of other windows, and does a weird opening animation.) https://forums.zotero.org/discussion/82050/zotero-preferences-window-issue-with-tiling-window-managers --- chrome/content/zotero/xpcom/utilities_internal.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js index 1c1350d363..af120c7d60 100644 --- a/chrome/content/zotero/xpcom/utilities_internal.js +++ b/chrome/content/zotero/xpcom/utilities_internal.js @@ -1744,8 +1744,7 @@ Zotero.Utilities.Internal = { let args = [ 'chrome://zotero/content/preferences/preferences.xul', 'zotero-prefs', - 'chrome,titlebar,toolbar,centerscreen,' - + Zotero.Prefs.get('browser.preferences.instantApply', true) ? 'dialog=no' : 'modal', + 'chrome,titlebar,toolbar,centerscreen', io ];