Browse Source

Merge pull request #1655 from Faoc/fix/start-minimized

Fixes not starting minimized on Linux/MacOS systems
pull/1853/head
Ramiro Saenz 7 years ago committed by GitHub
parent
commit
ca56909e00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      electron/main.js

8
electron/main.js

@ -164,7 +164,13 @@ function createWindow () {
});
if ( !config.get('start_minimized') && config.get('maximized') ) mainWindow.maximize();
if ( config.get('window_display_behavior') !== 'show_trayIcon' && config.get('start_minimized') ) mainWindow.minimize();
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();
});
}
// Check if the window its outside of the view (ex: multi monitor setup)
const { positionOnScreen } = require('./utils/positionOnScreen');

Loading…
Cancel
Save