From 44479f24dd26950462ef401cbe955cb69d37c7b1 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 17 Apr 2017 22:10:56 +0100 Subject: [PATCH] add command line arg (--hidden) for electron app Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- electron/src/electron-main.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/electron/src/electron-main.js b/electron/src/electron-main.js index 33b44ce9..e6ffffac 100644 --- a/electron/src/electron-main.js +++ b/electron/src/electron-main.js @@ -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; });