From f03a00d2af2950e1ff094cc598e1d79c110ef7f0 Mon Sep 17 00:00:00 2001 From: Arjun <6592213+arkml@users.noreply.github.com> Date: Wed, 4 Feb 2026 22:45:51 +0530 Subject: [PATCH] fix startup flash --- apps/x/apps/main/src/main.ts | 7 +++++++ apps/x/apps/renderer/index.html | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/apps/x/apps/main/src/main.ts b/apps/x/apps/main/src/main.ts index 6ddab7bc..d73ae442 100644 --- a/apps/x/apps/main/src/main.ts +++ b/apps/x/apps/main/src/main.ts @@ -64,6 +64,8 @@ function createWindow() { const win = new BrowserWindow({ width: 1280, height: 800, + show: false, // Don't show until ready + backgroundColor: "#252525", // Prevent white flash (matches dark mode) webPreferences: { // IMPORTANT: keep Node out of renderer nodeIntegration: false, @@ -73,6 +75,11 @@ function createWindow() { }, }); + // Show window when content is ready to prevent blank screen + win.once("ready-to-show", () => { + win.show(); + }); + // Open external links in system browser (not sandboxed Electron window) // This handles window.open() and target="_blank" links win.webContents.setWindowOpenHandler(({ url }) => { diff --git a/apps/x/apps/renderer/index.html b/apps/x/apps/renderer/index.html index 1803a850..856065c2 100644 --- a/apps/x/apps/renderer/index.html +++ b/apps/x/apps/renderer/index.html @@ -5,6 +5,22 @@ Rowboat + +