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

Preserve term frame when doing restore.

parent 0cea5bfb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -270,6 +270,8 @@ NSWindowDelegate,
// The window's original screen.
- (NSScreen*)screen;
 
- (void)setFrameValue:(NSValue *)value;
// The PTYWindow for this controller.
- (PTYWindow*)ptyWindow;
 
Loading
Loading
Loading
Loading
@@ -591,6 +591,11 @@ NSString *sessionsKey = @"sessions";
return number_;
}
 
- (void)setFrameValue:(NSValue *)value
{
[[self window] setFrame:[value rectValue] display:YES];
}
- (PTYWindow*)ptyWindow
{
return (PTYWindow*) [self window];
Loading
Loading
Loading
Loading
@@ -18,6 +18,10 @@
NSDictionary *arrangement = [state decodeObjectForKey:@"ptyarrangement"];
if (arrangement) {
PseudoTerminal *term = [PseudoTerminal bareTerminalWithArrangement:arrangement];
NSRect rect = [[term window] frame];
[term performSelector:@selector(setFrameValue:)
withObject:[NSValue valueWithRect:rect]
afterDelay:0];
completionHandler([term window], nil);
[[iTermController sharedInstance] addInTerminals:term];
} else {
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