summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2020-12-29 13:45:30 +0000
committerAlan Third <alan@idiocy.org>2020-12-29 13:45:30 +0000
commit177863b1ce4f1ede76b1921390e50c90136af27d (patch)
treea34eacfd1f133a36826c3c3fb8706b3664baea8b /src
parentee0e259e5d52749999be329afa9c764a8aff0531 (diff)
downloademacs-177863b1ce4f1ede76b1921390e50c90136af27d.tar.gz
Fix crash in NS menu code
* src/nsmenu.m (ns_update_menubar): When the menu generation code was copied from xmenu.c the fix for waiting_for_input was lost. Reinstate it.
Diffstat (limited to 'src')
-rw-r--r--src/nsmenu.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 23699627b15..201c02bb35d 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -104,6 +104,7 @@ ns_update_menubar (struct frame *f, bool deep_p)
NSAutoreleasePool *pool;
BOOL needsSet = NO;
id menu = [NSApp mainMenu];
+ bool owfi;
Lisp_Object items;
widget_value *wv, *first_wv, *prev_wv = 0;
@@ -171,6 +172,13 @@ ns_update_menubar (struct frame *f, bool deep_p)
set_buffer_internal_1 (XBUFFER (buffer));
+ /* TODO: for some reason this is not needed in other terms, but
+ some menu updates call Info-extract-pointer which causes
+ abort-on-error if waiting-for-input. Needs further
+ investigation. */
+ owfi = waiting_for_input;
+ waiting_for_input = 0;
+
/* Run the Lucid hook. */
safe_run_hooks (Qactivate_menubar_hook);
@@ -223,6 +231,7 @@ ns_update_menubar (struct frame *f, bool deep_p)
submenu_start[i] = -1;
finish_menu_items ();
+ waiting_for_input = owfi;
/* Convert menu_items into widget_value trees
to display the menu. This cannot evaluate Lisp code. */