diff options
author | Jannick Hemelhof | 2019-04-14 10:19:42 +0200 |
---|---|---|
committer | Jannick Hemelhof | 2019-04-14 10:19:42 +0200 |
commit | 9adcacff9af9e2ab26a70669a881df563393afc6 (patch) | |
tree | c7f14586b88d10a1c8dcaa0f3e28b831c85fc81e /electron_4.patch | |
parent | 27afb24bc9b071db3d924f0aa2220451895e5fc4 (diff) | |
download | aur-9adcacff9af9e2ab26a70669a881df563393afc6.tar.gz |
Fixed package for Electron 4 and js-sequence-diagrams
Diffstat (limited to 'electron_4.patch')
-rw-r--r-- | electron_4.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/electron_4.patch b/electron_4.patch new file mode 100644 index 000000000000..470e7bb8da5e --- /dev/null +++ b/electron_4.patch @@ -0,0 +1,35 @@ +diff -ura a/lib/main-app.js b/lib/main-app.js +--- a/lib/main-app.js 2019-02-08 12:33:20.000000000 +0100 ++++ b/lib/main-app.js 2019-04-14 10:06:21.472641974 +0200 +@@ -10,19 +10,20 @@ + + var mainWindow = null + +-var shouldQuit = app.makeSingleInstance(function (commandLine, workingDirectory) { +- if (mainWindow) { +- if (process.platform === 'win32') { +- mainWindow.minimize() +- mainWindow.restore() +- } +- mainWindow.focus() +- } +- return true +-}) ++const gotTheLock = app.requestSingleInstanceLock() + +-if (shouldQuit) { ++if (!gotTheLock) { + app.quit() ++} else { ++ app.on('second-instance', (event, commandLine, workingDirectory) => { ++ if (mainWindow) { ++ if (process.platform === 'win32') { ++ mainWindow.minimize() ++ mainWindow.restore() ++ } ++ mainWindow.focus() ++ } ++ }) + } + + var isUpdateReady = false |