diff --git a/electron/main.ts b/electron/main.ts index 7880a1b..4b13824 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -32,6 +32,7 @@ function createWindow() { minWidth: 800, minHeight: 600, title: "r2modmanplusplus", + show: false, // Don't show window until content is ready autoHideMenuBar: true, // Hide menu bar by default, show on Alt key press (Windows/Linux) webPreferences: { preload: path.join(__dirname, "../preload/index.js"), @@ -47,6 +48,11 @@ function createWindow() { windows: [win], }) + // Show window when content is ready to avoid white flash + win.once("ready-to-show", () => { + win?.show() + }) + // Test active push message to Renderer-process. win.webContents.on("did-finish-load", () => { win?.webContents.send("main-process-message", new Date().toLocaleString())