Repository: cordova-osx Updated Branches: refs/heads/master 34d879e0c -> f71a46deb
CB-12339: handle re-open app window This closes #39 Project: http://git-wip-us.apache.org/repos/asf/cordova-osx/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-osx/commit/f71a46de Tree: http://git-wip-us.apache.org/repos/asf/cordova-osx/tree/f71a46de Diff: http://git-wip-us.apache.org/repos/asf/cordova-osx/diff/f71a46de Branch: refs/heads/master Commit: f71a46debe3a5ea714c034455f53e0a5a4b8b781 Parents: 34d879e Author: alberto lalama <[email protected]> Authored: Thu Aug 17 18:55:24 2017 -0400 Committer: Tobias Bocanegra <[email protected]> Committed: Fri Aug 18 14:13:39 2017 +0900 ---------------------------------------------------------------------- .../project/__PROJECT_NAME__/Classes/AppDelegate.m | 10 ++++++++++ 1 file changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/f71a46de/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m ---------------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
