From af1da8fc0a0e7f23e0d3633cdf1a41d93d56e576 Mon Sep 17 00:00:00 2001 From: Nils Maier Date: Tue, 10 Sep 2019 09:23:38 +0200 Subject: [PATCH] Fix maximized state being refused with dims Closes #84 --- lib/windowstatetracker.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/windowstatetracker.ts b/lib/windowstatetracker.ts index 6f88c15..7cdc5cd 100644 --- a/lib/windowstatetracker.ts +++ b/lib/windowstatetracker.ts @@ -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; }