mirror of
https://github.com/atom/atom.git
synced 2026-02-13 16:14:59 -05:00
Save window size and position. Fixes #45
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -73,5 +73,5 @@
|
||||
[(AtomApp *)NSApp removeController:self];
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user