From 98cf5d25df416ab0233966512c660bed199e128e Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Wed, 19 May 2021 17:45:15 -0400 Subject: [PATCH] [MM-35781] Another workaround for Linux resizing (#1608) --- src/main/windows/windowManager.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/windows/windowManager.js b/src/main/windows/windowManager.js index b7fbccff..012635c5 100644 --- a/src/main/windows/windowManager.js +++ b/src/main/windows/windowManager.js @@ -144,8 +144,18 @@ function handleResizeMainWindow() { bounds = status.mainWindow.getContentBounds(); } - if (currentView) { - currentView.setBounds(getAdjustedWindowBoundaries(bounds.width, bounds.height, !urlUtils.isTeamUrl(currentView.server.url, currentView.view.webContents.getURL()))); + const setBoundsFunction = () => { + if (currentView) { + currentView.setBounds(getAdjustedWindowBoundaries(bounds.width, bounds.height, !urlUtils.isTeamUrl(currentView.server.url, currentView.view.webContents.getURL()))); + } + }; + + // Another workaround since the window doesn't update properly under Linux for some reason + // See above comment + if (process.platform === 'linux') { + setTimeout(setBoundsFunction, 10); + } else { + setBoundsFunction(); } status.viewManager.setLoadingScreenBounds(); }