Add 'activate-with-no-open-windows' event for app.

Fixes #194.
This commit is contained in:
Cheng Zhao 2014-03-05 18:09:44 +08:00
parent a74d3d210d
commit 839a751de5
7 changed files with 33 additions and 0 deletions

View file

@ -35,4 +35,15 @@
}
}
- (BOOL)applicationShouldHandleReopen:(NSApplication*)theApplication
hasVisibleWindows:(BOOL)flag {
atom::Browser* browser = atom::Browser::Get();
if (flag) {
return YES;
} else {
browser->ActivateWithNoOpenWindows();
return NO;
}
}
@end