[MM-35781] Another workaround for Linux resizing (#1608)

This commit is contained in:
Devin Binnie
2021-05-19 17:45:15 -04:00
committed by GitHub
parent 4fdcaf66a3
commit 98cf5d25df

View File

@@ -144,9 +144,19 @@ function handleResizeMainWindow() {
bounds = status.mainWindow.getContentBounds();
}
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();
}