Skip to content

Commit cb1a500

Browse files
authored
fix(electron): wait until ready before showing the main window (anomalyco#22262)
1 parent 65e3348 commit cb1a500

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/desktop-electron/src/main/windows.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function createMainWindow(globals: Globals) {
6666
y: state.y,
6767
width: state.width,
6868
height: state.height,
69-
show: true,
69+
show: false,
7070
title: "OpenCode",
7171
icon: iconPath(),
7272
backgroundColor,
@@ -94,6 +94,10 @@ export function createMainWindow(globals: Globals) {
9494
wireZoom(win)
9595
injectGlobals(win, globals)
9696

97+
win.once("ready-to-show", () => {
98+
win.show()
99+
})
100+
97101
return win
98102
}
99103

0 commit comments

Comments
 (0)