Skip to content

Commit 547f2c0

Browse files
committed
dont show until loaded
1 parent e66df8f commit 547f2c0

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

main.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,19 @@ function createWindow () {
2929
nodeIntegration: true
3030
},
3131
icon: 'assets/solokeys-32x32.png',
32-
})
32+
show: false,
33+
});
34+
35+
win.once('ready-to-show', () => {
36+
win.show()
37+
3338

34-
// and load the index.html of the app.
35-
// win.loadFile('app/index.html')
36-
win.loadURL(url.format({
37-
pathname: path.join(__dirname, 'index.html'),
38-
protocol: 'file:',
39-
slashes: true
40-
}));
39+
});
40+
win.loadURL(url.format({
41+
pathname: path.join(__dirname, 'index.html'),
42+
protocol: 'file:',
43+
slashes: true
44+
}));
4145

4246
// Open the DevTools.
4347
if (isDev)
@@ -53,11 +57,6 @@ function createWindow () {
5357
win = null
5458
})
5559

56-
// win.addEventListener('contextmenu', (e) => {
57-
// e.preventDefault()
58-
// rightClickPosition = {x: e.x, y: e.y}
59-
// menu.popup(remote.getCurrentWindow())
60-
// }, false)
6160
}
6261

6362
// This method will be called when Electron has finished

0 commit comments

Comments
 (0)