diff --git a/src/main/mainWindow.js b/src/main/mainWindow.js index 3e18dc8c..ed390014 100644 --- a/src/main/mainWindow.js +++ b/src/main/mainWindow.js @@ -44,7 +44,7 @@ function createMainWindow(config, options) { windowOptions = {width: defaultWindowWidth, height: defaultWindowHeight}; } - const {hideOnStartup, trayIconShown} = options; + const {hideOnStartup} = options; const {maximized: windowIsMaximized} = windowOptions; if (process.platform === 'linux') { @@ -53,7 +53,8 @@ function createMainWindow(config, options) { Object.assign(windowOptions, { title: app.name, fullscreenable: true, - show: hideOnStartup || false, + show: false, // don't start the window until it is ready and only if it isn't hidden + paintWhenInitiallyHidden: true, // we want it to start painting to get info from the webapp minWidth: minimumWindowWidth, minHeight: minimumWindowHeight, frame: !isFramelessWindow(), @@ -75,15 +76,6 @@ function createMainWindow(config, options) { const indexURL = global.isDev ? 'http://localhost:8080/browser/index.html' : `file://${app.getAppPath()}/browser/index.html`; mainWindow.loadURL(indexURL); - // handle hiding the app when launched by auto-start - if (hideOnStartup) { - if (trayIconShown && process.platform !== 'darwin') { - mainWindow.hide(); - } else { - mainWindow.minimize(); - } - } - mainWindow.once('ready-to-show', () => { mainWindow.webContents.zoomLevel = 0;