From 2bb9a9788a0ef07430018bbe9709da2fd1a9abd1 Mon Sep 17 00:00:00 2001 From: Niklas Steiner Date: Thu, 14 Jan 2021 21:54:30 +0100 Subject: [PATCH] Hide main window until it is loaded --- src/main/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/index.ts b/src/main/index.ts index 1e1b9246..1e736d1a 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -30,12 +30,17 @@ const createWindow = (): void => { frame: false, icon: 'src/main/icons/icn.ico', backgroundColor: '#1C1C1C', + show: false, webPreferences: { nodeIntegration: true, enableRemoteModule: true } }); + mainWindow.once('ready-to-show', () => { + mainWindow.show(); + }); + const lastX = settings.get('cache.main.lastWindowX'); const lastY = settings.get('cache.main.lastWindowY');