Fix maximized state being refused with dims

Closes #84
This commit is contained in:
Nils Maier 2019-09-10 09:23:38 +02:00
parent 39f4237cde
commit af1da8fc0a

View File

@ -55,13 +55,15 @@ export class WindowStateTracker {
getOptions(options: any) {
const result = Object.assign(options, {
width: this.width,
height: this.height,
state: this.state,
});
if (this.top >= 0) {
result.top = this.top;
result.left = this.left;
if (result.state !== "maximized") {
result.width = this.width;
result.theight = this.height;
if (this.top >= 0) {
result.top = this.top;
result.left = this.left;
}
}
return result;
}