Skip to content
Snippets Groups Projects
Commit 23650976 authored by George Nachman's avatar George Nachman
Browse files

Allow windows to be wider or taller than their current display. macOS

actually allows this if screens don't have their own spaces. Issue 6125
parent 1265313b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3204,14 +3204,18 @@ ITERM_WEAKLY_REFERENCEABLE
NSStringFromSize(proposedFrameSize),
NSStringFromSize(originalProposal),
NSStringFromSize(NSMakeSize(charWidth, charHeight)));
if (snapWidth && proposedFrameSize.width + charWidth > screenFrame.size.width) {
if (snapWidth &&
proposedFrameSize.width + charWidth > screenFrame.size.width &&
proposedFrameSize.width < screenFrame.size.width) {
CGFloat snappedMargin = screenFrame.size.width - proposedFrameSize.width;
CGFloat desiredMargin = screenFrame.size.width - originalProposal.width;
if (desiredMargin <= ceil(snappedMargin / 2.0)) {
proposedFrameSize.width = screenFrame.size.width;
}
}
if (snapHeight && proposedFrameSize.height + charHeight > screenFrame.size.height) {
if (snapHeight &&
proposedFrameSize.height + charHeight > screenFrame.size.height &&
proposedFrameSize.height < screenFrame.size.height) {
CGFloat snappedMargin = screenFrame.size.height - proposedFrameSize.height;
CGFloat desiredMargin = screenFrame.size.height - originalProposal.height;
if (desiredMargin <= ceil(snappedMargin / 2.0)) {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment