Skip to content

Commit b1e32f6

Browse files
committed
Fix one case of "SSH input fields cut off"
When the last selected favorite was "Quick Connect" with SSH, on the next launch SSH would be re-selected, but the fields other than SSH Host would be cut off. This was caused by a race condition between our window setup code and Cocoas window restoration code. Solved by disabling window restoration for now (didn't really work for us anyway).
1 parent 19a1c9f commit b1e32f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/SPWindowController.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ - (void)awakeFromNib
9090
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStarted:) name:PSMTabDragDidBeginNotification object:nil];
9191
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStopped:) name:PSMTabDragDidEndNotification object:nil];
9292
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_updateLineHidingViewState) name:SPWindowToolbarDidToggleNotification object:nil];
93+
94+
// Because we are a document-based app we automatically adopt window restoration on 10.7+.
95+
// However that causes a race condition with our own window setup code.
96+
// Remove this when we actually support restoration.
97+
if([[self window] respondsToSelector:@selector(setRestorable:)])
98+
[[self window] setRestorable:NO];
9399
}
94100

95101
#pragma mark -

0 commit comments

Comments
 (0)