From 3cddd53ca80f8a0aef64470caa9c4ea6e5bb29fc Mon Sep 17 00:00:00 2001 From: pbca26 Date: Tue, 28 Mar 2017 19:21:10 +0200 Subject: [PATCH] added condition to trigger defered quit on osx --- main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.js b/main.js index b272240..9c8e35a 100644 --- a/main.js +++ b/main.js @@ -217,6 +217,7 @@ function createLoadingWindow() { /* the user only tried to close the window */ closeAppAfterLoading = true; e.preventDefault(); + console.log('lwindow' + loadingWindow); if (loadingWindow) loadingWindow.hide(); } @@ -395,6 +396,11 @@ app.on('before-quit', function (event) { console.log('before-quit'); if (mainWindow === null && loadingWindow != null) { //mainWindow not intitialised and loadingWindow not dereferenced //loading window is still open + if (os.platform() === 'darwin') { + let code = `$('#loading_status_text').html('Preparing to shutdown the wallet.
Please wait while all daemons are closed...')`; + loadingWindow.webContents.executeJavaScript(code); + closeAppAfterLoading = true; + } console.log('before-quit prevented'); event.preventDefault(); }