From 7c27a6d1cd70a331f1d03c866c778b730edc1f9c Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Fri, 19 Jul 2024 10:14:48 -0400 Subject: [PATCH] [MM-59412] Reinstate the resize listener for Windows and the exception for willResize (#3098) --- src/main/windows/mainWindow.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/windows/mainWindow.ts b/src/main/windows/mainWindow.ts index 2fae5556..b4dc0c50 100644 --- a/src/main/windows/mainWindow.ts +++ b/src/main/windows/mainWindow.ts @@ -138,7 +138,7 @@ export class MainWindow extends EventEmitter { // This is mostly a fix for Windows 11 snapping this.win.on('moved', this.onResized); } - if (process.platform === 'linux') { + if (process.platform !== 'darwin') { this.win.on('resize', this.onResize); } this.win.webContents.on('before-input-event', this.onBeforeInputEvent); @@ -515,8 +515,8 @@ export class MainWindow extends EventEmitter { private onResize = () => { log.silly('onResize'); - // Workaround for macOS to stop the window from sending too many resize calls to the BrowserViews - if (process.platform === 'darwin' && this.isResizing) { + // Workaround for Windows to stop the window from sending too many resize calls to the BrowserViews + if (process.platform === 'win32' && this.isResizing) { return; } this.emitBounds();