From 5123c21e0d75456fe41fca2740882b10d8e17296 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 30 Jul 2017 07:43:48 -0400 Subject: [PATCH] Don't close Zotero on macOS when window is closed Keep the application open with limited menus, including a Window -> Zotero option bound to (Cmd-0) that can be used to reopen the main window. This allows Zotero to use almost no CPU (instead of a few percentage points when the window is open, even when hidden with Cmd-H, though it'd be nice to fix that) and still allow saves from the connector. There might be some things that aren't being destroyed properly when the window is closed or other bugginess, but it seems to work pretty well. --- .../zotero/standalone/hiddenWindow.xul | 57 ++++++++++++++++--- .../content/zotero/standalone/standalone.js | 1 - 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/chrome/content/zotero/standalone/hiddenWindow.xul b/chrome/content/zotero/standalone/hiddenWindow.xul index b34f6a1737..ddf43400f6 100644 --- a/chrome/content/zotero/standalone/hiddenWindow.xul +++ b/chrome/content/zotero/standalone/hiddenWindow.xul @@ -37,24 +37,67 @@ ]> - - + + + + + - - + + + + + + + + + + + + + + + + diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js index 4a2ebc2535..e9f08b4284 100644 --- a/chrome/content/zotero/standalone/standalone.js +++ b/chrome/content/zotero/standalone/standalone.js @@ -225,7 +225,6 @@ const ZoteroStandalone = new function() { */ this.onUnload = function() { ZoteroPane.destroy(); - goQuitApplication(); } }