(x_update_menu_appearance): Save and restore value of
authorGerd Moellmann <gerd@gnu.org>
Tue, 14 Aug 2001 10:57:25 +0000 (10:57 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 14 Aug 2001 10:57:25 +0000 (10:57 +0000)
interrupt_input_blocked.

src/ChangeLog
src/xfaces.c

index 4aea39c..eede405 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-14  Gerd Moellmann  <gerd@gnu.org>
+
+       * xfaces.c (x_update_menu_appearance): Save and restore value of
+       interrupt_input_blocked.
+
 2001-08-13  Gerd Moellmann  <gerd@gnu.org>
 
        * xdisp.c (move_it_by_lines) <DVPOS < 0>: If not already on
index 734e1c4..e2ddb40 100644 (file)
@@ -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);