commit | f71a46debe3a5ea714c034455f53e0a5a4b8b781 | [log] [tgz] |
---|---|---|
author | alberto lalama <albertolalama@users.noreply.github.com> | Thu Aug 17 18:55:24 2017 -0400 |
committer | Tobias Bocanegra <tripod@adobe.com> | Fri Aug 18 14:13:39 2017 +0900 |
tree | 81d179e316b614b9f9fdb07a1f452a000131f9fe | |
parent | 34d879e0ca56e32b8224160bba49b20e1a969721 [diff] |
CB-12339: handle re-open app window This closes #39
diff --git a/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m index 9a463e0..510ee44 100644 --- a/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m +++ b/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m
@@ -44,4 +44,14 @@ } +- (BOOL)applicationShouldHandleReopen:(NSApplication *)app hasVisibleWindows:(BOOL)visibleWindows +{ + if (visibleWindows) { + [self.window orderFront:self]; + } else { + [self.window makeKeyAndOrderFront:self]; + } + return YES; +} + @end