From a3d685e13262c17a2b7bdf63190e12fd68575ade Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Mon, 18 Apr 2016 17:17:32 -0700 Subject: [PATCH] OS X: Don't stop music when tabbing to another program (#423) --- main/tray.js | 1 + main/windows.js | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/main/tray.js b/main/tray.js index 92454d91..fa81f951 100644 --- a/main/tray.js +++ b/main/tray.js @@ -79,4 +79,5 @@ function showApp () { function hideApp () { windows.main.hide() + windows.main.send('dispatch', 'backToList') } diff --git a/main/windows.js b/main/windows.js index 9326c5e4..00da884b 100644 --- a/main/windows.js +++ b/main/windows.js @@ -114,13 +114,10 @@ function createMainWindow () { } else if (!electron.app.isQuitting) { e.preventDefault() win.hide() + win.send('dispatch', 'backToList') } }) - win.on('hide', function () { - win.send('dispatch', 'backToList') - }) - win.once('closed', function () { windows.main = null })