aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCharles A. Roelli2017-07-10 21:08:14 +0200
committerCharles A. Roelli2017-07-23 16:48:33 +0200
commit2c87aab57946b95d67b664259f30e64468d08544 (patch)
treeb0236e5ba254f465ee0876ef3ff9ab48deeae800 /src
parente1d1aa69e8cce480f51ebf81d5b0bb55c7ad4ec8 (diff)
downloademacs-2c87aab57946b95d67b664259f30e64468d08544.tar.gz
emacs-2c87aab57946b95d67b664259f30e64468d08544.zip
Enable GUI Emacs without 'make install' on macOS (Bug #27645)
* nextstep/INSTALL: Correct it, and mention that Emacs can be run from 'src/emacs'. * src/nsterm.m (applicationDidFinishLaunching:): When Emacs is launched outside of a macOS application bundle, change its activation policy from the default 'prohibited' to 'regular'. ; * etc/NEWS: Mention the change on macOS.
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index a3c7031331a..36d906a7cec 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5497,6 +5497,19 @@ ns_term_shutdown (int sig)
5497 object:nil]; 5497 object:nil];
5498#endif 5498#endif
5499 5499
5500#ifdef NS_IMPL_COCOA
5501 if ([NSApp activationPolicy] == NSApplicationActivationPolicyProhibited) {
5502 /* Set the app's activation policy to regular when we run outside
5503 of a bundle. This is already done for us by Info.plist when we
5504 run inside a bundle. */
5505 [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
5506 [NSApp setApplicationIconImage:
5507 [EmacsImage
5508 allocInitFromFile:
5509 build_string("icons/hicolor/128x128/apps/emacs.png")]];
5510 }
5511#endif
5512
5500 ns_send_appdefined (-2); 5513 ns_send_appdefined (-2);
5501} 5514}
5502 5515