summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBrendan Allan <[email protected]>2026-04-13 15:17:09 +0800
committerGitHub <[email protected]>2026-04-13 15:17:09 +0800
commitcb1a50055c9112bf18bec20f64026a3357c0d35b (patch)
treefac0187b83d78eb4907d1601d170389678257388
parent65e334823264fb20e4a64181599d6001815813ba (diff)
downloadopencode-cb1a50055c9112bf18bec20f64026a3357c0d35b.tar.gz
opencode-cb1a50055c9112bf18bec20f64026a3357c0d35b.zip
fix(electron): wait until ready before showing the main window (#22262)
-rw-r--r--packages/desktop-electron/src/main/windows.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/desktop-electron/src/main/windows.ts b/packages/desktop-electron/src/main/windows.ts
index 170cd877c..95f80c124 100644
--- a/packages/desktop-electron/src/main/windows.ts
+++ b/packages/desktop-electron/src/main/windows.ts
@@ -66,7 +66,7 @@ export function createMainWindow(globals: Globals) {
y: state.y,
width: state.width,
height: state.height,
- show: true,
+ show: false,
title: "OpenCode",
icon: iconPath(),
backgroundColor,
@@ -94,6 +94,10 @@ export function createMainWindow(globals: Globals) {
wireZoom(win)
injectGlobals(win, globals)
+ win.once("ready-to-show", () => {
+ win.show()
+ })
+
return win
}