Fix zoom reset on app init by removing preferred size handler

This commit is contained in:
ayumi-signal
2025-11-20 10:51:54 -08:00
committed by GitHub
parent a73133e534
commit 879d5946fa
2 changed files with 0 additions and 3 deletions

View File

@@ -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');

View File

@@ -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;