Merge pull request #2697 from vector-im/dbkr/show_when_ready

Only show window when ready
This commit is contained in:
Richard van der Hoff 2016-12-06 09:59:32 +00:00 committed by GitHub
commit b825862f95

View File

@ -159,10 +159,14 @@ electron.app.on('ready', () => {
mainWindow = new electron.BrowserWindow({
icon: `${__dirname}/../img/riot.ico`,
width: 1024, height: 768,
show: false,
});
mainWindow.loadURL(`file://${__dirname}/../../webapp/index.html`);
electron.Menu.setApplicationMenu(VectorMenu);
mainWindow.once('ready-to-show', () => {
mainWindow.show();
});
mainWindow.on('closed', () => {
mainWindow = null;
});