diff --git a/electron/main.js b/electron/main.js index 777f58342..cc1b1f6a7 100644 --- a/electron/main.js +++ b/electron/main.js @@ -109,12 +109,17 @@ function createWindow () { if ( config.get('user_agent').length > 0 ) mainWindow.webContents.setUserAgent( config.get('user_agent') ); if ( !config.get('start_minimized') && config.get('maximized') ) mainWindow.maximize(); - if ( config.get('window_display_behavior') !== 'show_trayIcon' && config.get('start_minimized') ) { - // Wait for the mainWindow.loadURL(..) and the optional mainWindow.webContents.openDevTools() - // to be finished before minimizing - mainWindow.webContents.once('did-finish-load', function(e) { - mainWindow.minimize(); - }); + if (config.get('start_minimized')){ + if (config.get('window_display_behavior') == 'show_taskbar') { + mainWindow.webContents.once('did-finish-load', function(e) { + mainWindow.minimize(); + }); + } + else { + mainWindow.webContents.once('did-finish-load', function(e) { + mainWindow.hide(); + }); + } } // Check if the window its outside of the view (ex: multi monitor setup)