[MM-59412] Reinstate the resize listener for Windows and the exception for willResize (#3098)

This commit is contained in:
Devin Binnie 2024-07-19 10:14:48 -04:00 committed by GitHub
parent 080e4bf727
commit 7c27a6d1cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,7 +138,7 @@ export class MainWindow extends EventEmitter {
// This is mostly a fix for Windows 11 snapping // This is mostly a fix for Windows 11 snapping
this.win.on('moved', this.onResized); this.win.on('moved', this.onResized);
} }
if (process.platform === 'linux') { if (process.platform !== 'darwin') {
this.win.on('resize', this.onResize); this.win.on('resize', this.onResize);
} }
this.win.webContents.on('before-input-event', this.onBeforeInputEvent); this.win.webContents.on('before-input-event', this.onBeforeInputEvent);
@ -515,8 +515,8 @@ export class MainWindow extends EventEmitter {
private onResize = () => { private onResize = () => {
log.silly('onResize'); log.silly('onResize');
// Workaround for macOS to stop the window from sending too many resize calls to the BrowserViews // Workaround for Windows to stop the window from sending too many resize calls to the BrowserViews
if (process.platform === 'darwin' && this.isResizing) { if (process.platform === 'win32' && this.isResizing) {
return; return;
} }
this.emitBounds(); this.emitBounds();