You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by tr...@apache.org on 2017/08/18 05:24:44 UTC
mac commit: CB-12339: handle re-open app window
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 <al...@users.noreply.github.com>
Authored: Thu Aug 17 18:55:24 2017 -0400
Committer: Tobias Bocanegra <tr...@adobe.com>
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: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org