File tree 2 files changed +3
-9
lines changed
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,9 @@ app.on("window-all-closed", () => {
45
45
} ) ;
46
46
47
47
// Check single instance app
48
- const shouldQuit = app . makeSingleInstance ( function ( commandLine , workingDirectory ) {
49
- // Someone tried to run a second instance, we should focus our window
50
- if ( mainWindow ) {
51
- if ( mainWindow . isMinimized ( ) ) mainWindow . restore ( ) ;
52
- mainWindow . focus ( ) ;
53
- }
54
- } ) ;
48
+ const gotLock = app . requestSingleInstanceLock ( ) ;
55
49
56
- if ( shouldQuit ) {
50
+ if ( ! gotLock ) {
57
51
app . quit ( ) ;
58
52
process . exit ( 0 ) ;
59
53
}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const mkdirp = require('mkdirp').sync
7
7
const os = require ( 'os' )
8
8
9
9
const downloadPath = path . join ( os . tmpdir ( ) , 'electron-api-tmp' )
10
- const ELECTRON_COMMIT = '35e90f742b8a2f1006157da2a9f394cd055aff74 '
10
+ const ELECTRON_COMMIT = 'bbba9ff906fce768b258569e84652bf1487338fa '
11
11
12
12
rm ( downloadPath )
13
13
You can’t perform that action at this time.
0 commit comments