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

This commit is contained in:
Devin Binnie 2021-05-19 17:47:35 -04:00 committed by GitHub
parent 2e60989d99
commit 0a42fb4c04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}