From 49f4a57a049b8c09b6f6932a907c1cd3c4eab7f9 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Tue, 24 Mar 2026 07:53:05 -0400 Subject: [PATCH] feat: prevent initial window state drift Signed-off-by: Adam Setch --- src/main/config.test.ts | 1 + src/main/config.ts | 4 ++++ 2 files changed, 5 insertions(+) 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, }, };