Merge pull request #2697 from vector-im/dbkr/show_when_ready
Only show window when ready
This commit is contained in:
commit
b825862f95
|
@ -159,10 +159,14 @@ electron.app.on('ready', () => {
|
||||||
mainWindow = new electron.BrowserWindow({
|
mainWindow = new electron.BrowserWindow({
|
||||||
icon: `${__dirname}/../img/riot.ico`,
|
icon: `${__dirname}/../img/riot.ico`,
|
||||||
width: 1024, height: 768,
|
width: 1024, height: 768,
|
||||||
|
show: false,
|
||||||
});
|
});
|
||||||
mainWindow.loadURL(`file://${__dirname}/../../webapp/index.html`);
|
mainWindow.loadURL(`file://${__dirname}/../../webapp/index.html`);
|
||||||
electron.Menu.setApplicationMenu(VectorMenu);
|
electron.Menu.setApplicationMenu(VectorMenu);
|
||||||
|
|
||||||
|
mainWindow.once('ready-to-show', () => {
|
||||||
|
mainWindow.show();
|
||||||
|
});
|
||||||
mainWindow.on('closed', () => {
|
mainWindow.on('closed', () => {
|
||||||
mainWindow = null;
|
mainWindow = null;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue