Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit ac40365

Browse files
committed
Fix the issue when dimensions were calculated before restoring size if finished.
1 parent 0f7b5fe commit ac40365

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/views/1_ApplicationComponent.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default class ApplicationComponent extends React.Component<{}, State> {
2222
const focusedWindow = remote.BrowserWindow.getFocusedWindow();
2323

2424
restoreWindowBounds(focusedWindow);
25+
setTimeout(() => this.recalculateDimensions(), 500);
2526

2627
this.addTab();
2728
this.state = {sessions: this.activeTab.sessions};

src/views/ViewUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ export function restoreWindowBounds(browserWindow: Electron.BrowserWindow) {
8888
const windowBounds: Electron.Rectangle = JSON.parse(localStorage.getItem(windowBoundsKey));
8989

9090
if (windowBounds) {
91-
browserWindow.setBounds(windowBounds);
91+
browserWindow.setBounds(windowBounds, false);
9292
}
9393
}

0 commit comments

Comments
 (0)