From 3b9459b683dcae29a22ff09ce4bc48a867628fbb Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:16:28 -0600 Subject: [PATCH] Fix zoom reset on app init by removing preferred size handler Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> --- app/main.main.ts | 1 - ts/services/ZoomFactorService.main.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/app/main.main.ts b/app/main.main.ts index 34eb460a29..e5e94300a1 100644 --- a/app/main.main.ts +++ b/app/main.main.ts @@ -220,7 +220,6 @@ const defaultWebPrefs = { getEnvironment() !== Environment.PackagedApp || !isProduction(app.getVersion()), spellcheck: false, - enablePreferredSizeMode: true, }; const DISABLE_IPV6 = process.argv.some(arg => arg === '--disable-ipv6'); diff --git a/ts/services/ZoomFactorService.main.ts b/ts/services/ZoomFactorService.main.ts index e20ca3896b..0141a4f5de 100644 --- a/ts/services/ZoomFactorService.main.ts +++ b/ts/services/ZoomFactorService.main.ts @@ -117,14 +117,12 @@ export class ZoomFactorService extends EventEmitter { return; } - window.webContents.on('preferred-size-changed', onWindowChange); window.webContents.on('zoom-changed', onWindowChange); this.on('zoomFactorChanged', onServiceChange); this.#isListeningForZoom = true; }; const stopListenForZoomEvents = () => { - window.webContents.off('preferred-size-changed', onWindowChange); window.webContents.off('zoom-changed', onWindowChange); this.off('zoomFactorChanged', onServiceChange); this.#isListeningForZoom = false;