Show mainWindow gracefully
http://electron.atom.io/docs/api/browser-window#showing-window-gracefully
This commit is contained in:
@@ -12,6 +12,9 @@ Release date: TBD
|
||||
|
||||
### Improvements
|
||||
|
||||
#### All Platforms
|
||||
- Suppress white screen which is displayed for a moment on startup
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
#### All Platforms
|
||||
|
@@ -447,8 +447,11 @@ app.on('ready', () => {
|
||||
if (process.platform === 'linux') {
|
||||
windowOptions.icon = path.resolve(assetsDir, 'appicon.png');
|
||||
}
|
||||
windowOptions.title = app.getName();
|
||||
Object.assign(windowOptions, {title: app.getName(), show: false});
|
||||
mainWindow = new BrowserWindow(windowOptions);
|
||||
mainWindow.once('ready-to-show', () => {
|
||||
mainWindow.show();
|
||||
});
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
session.defaultSession.on('will-download', (event, item) => {
|
||||
|
Reference in New Issue
Block a user