diff --git a/src/main/config.test.ts b/src/main/config.test.ts index 299721e11..f0c4412cd 100644 --- a/src/main/config.test.ts +++ b/src/main/config.test.ts @@ -35,5 +35,6 @@ describe('main/config.ts', () => { expect(WindowConfig.webPreferences).toBeDefined(); expect(WindowConfig.webPreferences.contextIsolation).toBe(true); expect(WindowConfig.webPreferences.nodeIntegration).toBe(false); + expect(WindowConfig.webPreferences.backgroundThrottling).toBe(false); }); }); diff --git a/src/main/config.ts b/src/main/config.ts index 1ced135f8..2b49861ab 100644 --- a/src/main/config.ts +++ b/src/main/config.ts @@ -52,5 +52,9 @@ export const WindowConfig: BrowserWindowConstructorOptions = { nodeIntegration: false, // Disable web security in development to allow CORS requests webSecurity: !process.env.VITE_DEV_SERVER_URL, + // Keep the renderer painting when the window is hidden so Chromium never + // freezes the last frame. Without this, reopening the menubar window shows + // stale notification content until the next React re-render completes. + backgroundThrottling: false, }, };