From b1e32f6583f113c279dcde61f4f531d637118bdd Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 8 Feb 2015 04:40:59 +0100 Subject: 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). --- Source/SPWindowController.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m index 0666f1a7..58afeb16 100644 --- a/Source/SPWindowController.m +++ b/Source/SPWindowController.m @@ -90,6 +90,12 @@ enum { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStarted:) name:PSMTabDragDidBeginNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStopped:) name:PSMTabDragDidEndNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_updateLineHidingViewState) name:SPWindowToolbarDidToggleNotification object:nil]; + + // Because we are a document-based app we automatically adopt window restoration on 10.7+. + // However that causes a race condition with our own window setup code. + // Remove this when we actually support restoration. + if([[self window] respondsToSelector:@selector(setRestorable:)]) + [[self window] setRestorable:NO]; } #pragma mark - -- cgit v1.2.3