Save window size and position. Fixes #45

This commit is contained in:
Corey Johnson
2011-11-07 15:52:52 -08:00
parent 8243046a73
commit 3df83d10d8
3 changed files with 33 additions and 7 deletions

View File

@@ -23,7 +23,9 @@
AtomController *controller = [[AtomController alloc] initWithPath:path];
[controllers addObject:controller];
[[controller window] makeKeyWindow];
// window.coffee will set the window size
[[controller window] setFrame:NSMakeRect(0, 0, 0, 0) display:YES animate:NO];
return controller;
}
@@ -81,6 +83,14 @@
}
}
- (void)terminate:(id)sender {
for (AtomController *controller in controllers) {
[controller.jscocoa callJSFunctionNamed:@"shutdown" withArguments:nil];
}
[super terminate:sender];
}
// AppDelegate
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
self.controllers = [NSMutableArray array];

View File

@@ -73,5 +73,5 @@
[(AtomApp *)NSApp removeController:self];
return YES;
}
@end