Skip to content

Commit

Permalink
make sure "ready-to-show" handler kicks in only once
Browse files Browse the repository at this point in the history
* some time ago @electron made "ready-to-show" event to be fired multiple times which goes against their documentation (possibly caused by electron/electron#25448) and so was causing the annoying windows flickering in the app
  • Loading branch information
devDefiWeb committed Nov 2, 2020
1 parent 273e5ff commit 93e4c1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/electron-main/window/main.ts
Expand Up @@ -140,7 +140,7 @@ export async function initMainBrowserWindow(ctx: Context): Promise<BrowserWindow
app.on(...appBeforeQuitEventArgs);

browserWindow
.on("ready-to-show", async () => {
.once("ready-to-show", async () => {
const boundsToRestore = await resolveBoundsToRestore(ctx, browserWindow.getBounds());

logger.verbose(JSON.stringify({boundsToRestore}));
Expand Down

0 comments on commit 93e4c1b

Please sign in to comment.