diff --git a/lib/etcher.js b/lib/etcher.js index 17794dd0..8c8f2fa0 100644 --- a/lib/etcher.js +++ b/lib/etcher.js @@ -37,12 +37,25 @@ electron.app.on('ready', function() { mainWindow = new electron.BrowserWindow({ width: 800, height: 380, + show: false, resizable: false, fullscreen: false, titleBarStyle: 'hidden-inset', icon: path.join(__dirname, '..', 'assets', 'icon.png') }); + // Prevent flash of white when starting the application + // https://github.com/atom/electron/issues/2172 + mainWindow.webContents.on('did-finish-load', function() { + + // The flash of white is still present for a very short + // while after the WebView reports it finished loading + setTimeout(function() { + mainWindow.show(); + }, 100); + + }); + mainWindow.on('closed', function() { mainWindow = null; });