Disable the NS app when no frames are left (bug#14619, bug#21357, bug#23586)
* src/nsfns.m (Fx_create_frame): Enable the app. * src/nsterm.m (ns_delete_terminal): Disable the app.
This commit is contained in:
parent
8fb32387c1
commit
b0fe06e656
2 changed files with 11 additions and 0 deletions
|
@ -1343,6 +1343,11 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side.
|
|||
|
||||
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);
|
||||
|
|
|
@ -5014,6 +5014,12 @@ static Lisp_Object ns_string_to_lispmod (const char *s)
|
|||
|
||||
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 ();
|
||||
|
|
Loading…
Add table
Reference in a new issue