* src/nsfns.m (Fx_create_frame): Enable the app.
* src/nsterm.m (ns_delete_terminal): Disable the app.
f->output_data.ns->in_animation = NO;
+#ifdef NS_IMPL_COCOA
+ /* If the app has previously been disabled, start it up again. */
+ [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
+#endif
+
[[EmacsView alloc] initFrameFromEmacs: f];
ns_icon (f, parms);
block_input ();
+#ifdef NS_IMPL_COCOA
+ /* Rather than try to clean up the NS environment we can just
+ disable the app and leave it waiting for any new frames. */
+ [NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited];
+#endif
+
image_destroy_all_bitmaps (dpyinfo);
ns_delete_display (dpyinfo);
unblock_input ();