Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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())
Expand Down
Loading