diff options
author | Sibren Vasse | 2020-02-21 00:38:24 +0100 |
---|---|---|
committer | Sibren Vasse | 2020-02-21 00:39:34 +0100 |
commit | cd0a4408e131e739b0db7675873529d640489589 (patch) | |
tree | a2277a7fa118ae33d8b2384ac30c2238aa8e37f3 /quit.patch | |
parent | d432abdb519ba9cfa918ed85fa979534081795a4 (diff) | |
download | aur-cd0a4408e131e739b0db7675873529d640489589.tar.gz |
Enable hide to tray (https://github.com/SibrenVasse/deezer/issues/4)
Diffstat (limited to 'quit.patch')
-rw-r--r-- | quit.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/quit.patch b/quit.patch new file mode 100644 index 000000000000..880a1311b050 --- /dev/null +++ b/quit.patch @@ -0,0 +1,26 @@ +diff --git a/build/main.js b/build/main.js +index 6934bbd..a150316 100644 +--- a/build/main.js ++++ b/build/main.js +@@ -3123,7 +3123,7 @@ module.exports = (function(modules) { + }; + } + getQuitOptions() { +- return { label: i18n.t("menu_quit-deezer_label"), role: "quit" }; ++ return { label: i18n.t("menu_quit-deezer_label"), click: () => { external_electron_.app.isQuiting = true; external_electron_.app.quit(); } }; + } + getReloadOptions() { + return { +@@ -4714,6 +4714,12 @@ module.exports = (function(modules) { + this.window.on("resize", () => { + this.windowState.save(); + }), ++ this.window.on('close', function(event) { ++ if(!external_electron_.app.isQuiting){ ++ event.preventDefault(); ++ this.hide(); ++ } ++ }), + this.window.once("ready-to-show", () => { + if (windowState.isMaximized) this.window.maximize(); + else if (isPlatform(PLATFORM_WINDOWS)) { |