Skip to content

Commit

Permalink
Allow auto maximize to be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
rxhanson committed Oct 16, 2021
1 parent 2670991 commit fb6835a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Rectangle/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class Defaults {
static let specifiedWidth = FloatDefault(key: "specifiedWidth", defaultValue: 1680)
static let moveCursorAcrossDisplays = OptionalBoolDefault(key: "moveCursorAcrossDisplays")
static let moveCursor = OptionalBoolDefault(key: "moveCursor")
static let autoMaximize = OptionalBoolDefault(key: "autoMaximize")

static var array: [Default] = [
launchOnLogin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class NextPrevDisplayCalculation: WindowCalculation {
}

override func calculateRect(_ params: RectCalculationParameters) -> RectResult {
if params.lastAction?.action == .maximize {
if params.lastAction?.action == .maximize && !Defaults.autoMaximize.userDisabled {
let rectResult = WindowCalculationFactory.maximizeCalculation.calculateRect(params)
return RectResult(rectResult.rect, resultingAction: .maximize)
}
Expand Down

0 comments on commit fb6835a

Please sign in to comment.