Skip to content

Commit

Permalink
Fixed bug with non-resizable windows not working properly for centeri…
Browse files Browse the repository at this point in the history
…ng and moving across displays
  • Loading branch information
Ryan Hanson committed Jan 16, 2020
1 parent 74aa713 commit c3beb48
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Rectangle.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
INFOPLIST_FILE = Rectangle/Info.plist;
Expand All @@ -1002,7 +1002,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 0.18;
MARKETING_VERSION = 0.19;
PRODUCT_BUNDLE_IDENTIFIER = com.knollsoft.Rectangle;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1019,7 +1019,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = XSYZ3E4B7D;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = Rectangle/Info.plist;
Expand All @@ -1028,7 +1028,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 0.18;
MARKETING_VERSION = 0.19;
PRODUCT_BUNDLE_IDENTIFIER = com.knollsoft.Rectangle;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
6 changes: 3 additions & 3 deletions Rectangle/WindowAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ enum WindowAction: Int {
}
}

var isDirectionalMove: Bool {
var resizes: Bool {
switch self {
case .moveUp, .moveDown, .moveLeft, .moveRight: return true
default: return false
case .moveUp, .moveDown, .moveLeft, .moveRight, .center, .nextDisplay, .previousDisplay: return false
default: return true
}
}

Expand Down
2 changes: 1 addition & 1 deletion Rectangle/WindowManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class WindowManager {

let visibleFrameOfDestinationScreen = NSRectToCGRect(calcResult.screen.visibleFrame)

let useFixedSizeMover = !frontmostWindowElement.isResizable() && !action.isDirectionalMove
let useFixedSizeMover = !frontmostWindowElement.isResizable() && action.resizes
let windowMoverChain = useFixedSizeMover
? fixedSizeWindowMoverChain
: standardWindowMoverChain
Expand Down

0 comments on commit c3beb48

Please sign in to comment.