diff --git a/main.ts b/main.ts index 05b1608..533b406 100644 --- a/main.ts +++ b/main.ts @@ -58,7 +58,8 @@ try { // This method will be called when Electron has finished // initialization and is ready to create browser windows. // Some APIs can only be used after this event occurs. - app.on('ready', createWindow); + // Added 400 ms to fix the black background issue while using transparent window. More detais at https://github.com/electron/electron/issues/15947 + app.on('ready', () => setTimeout(createWindow, 400)); // Quit when all windows are closed. app.on('window-all-closed', () => {