Skip to content

Commit 3e933a3

Browse files
committed
Show the window more gracefully, to avoid initial FOUC
1 parent 6e748fc commit 3e933a3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,18 @@ const createWindow = () => {
2929
webPreferences: {
3030
contextIsolation: true,
3131
nodeIntegration: false
32-
}
32+
},
33+
34+
show: false
3335
});
3436

3537
mainWindow.loadURL(APP_URL);
3638

39+
mainWindow.on('ready-to-show', function() {
40+
mainWindow!.show();
41+
mainWindow!.focus();
42+
});
43+
3744
mainWindow.on('closed', () => {
3845
mainWindow = null;
3946
});

0 commit comments

Comments
 (0)