From 04386463e8d533435ed8f5f02a0c5836a83998b9 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 14 Aug 2001 10:57:25 +0000 Subject: [PATCH] (x_update_menu_appearance): Save and restore value of interrupt_input_blocked. --- src/ChangeLog | 5 +++++ src/xfaces.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4aea39cc3b6..eede4051269 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-08-14 Gerd Moellmann + + * xfaces.c (x_update_menu_appearance): Save and restore value of + interrupt_input_blocked. + 2001-08-13 Gerd Moellmann * xdisp.c (move_it_by_lines) : If not already on diff --git a/src/xfaces.c b/src/xfaces.c index 734e1c493f9..e2ddb40244c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -4469,8 +4469,18 @@ x_update_menu_appearance (f) if (changed_p && f->output_data.x->menubar_widget) { + int blocked; + + /* Function set_frame_menubar may call Lisp, for example + from menu_item_eval_property inside a condition-case. If + that code signals an error, Fsignal totally unblocks + input, and if this function is called inside a + BLOCK/UNBLOCK_INPUT which it is, this will screw up the + interrupt_input_blocked count, unless we save it... */ + blocked = interrupt_input_blocked; free_frame_menubar (f); set_frame_menubar (f, 1, 1); + interrupt_input_blocked = blocked; } } } @@ -6039,8 +6049,8 @@ realize_basic_faces (f) int success_p = 0; int count = BINDING_STACK_SIZE (); - /* Block input there so that we won't be surprised by an X expose - event, for instance without having the faces set up. */ + /* Block input here so that we won't be surprised by an X expose + event, for instance, without having the faces set up. */ BLOCK_INPUT; specbind (Qscalable_fonts_allowed, Qt); -- 2.39.2