Skip to content

Commit

Permalink
Merge pull request #3641 from t3chguy/t3chguy/electron_launch_hidden
Browse files Browse the repository at this point in the history
add command line arg (--hidden) for electron app
  • Loading branch information
ara4n authored Apr 22, 2017
2 parents 523b315 + 44479f2 commit fb3ef89
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions electron/src/electron-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,12 @@ electron.app.on('ready', () => {
brand: vectorConfig.brand || 'Riot'
});

mainWindow.once('ready-to-show', () => {
mainWindow.show();
});
if (!process.argv.includes('--hidden')) {
mainWindow.once('ready-to-show', () => {
mainWindow.show();
});
}

mainWindow.on('closed', () => {
mainWindow = null;
});
Expand Down

0 comments on commit fb3ef89

Please sign in to comment.