]> code.delx.au - gnu-emacs/commitdiff
* xfns.c (Fx_file_dialog): Call x_menu_in_use and x_menu_set_in_use.
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 13 Nov 2004 23:29:11 +0000 (23:29 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 13 Nov 2004 23:29:11 +0000 (23:29 +0000)
Record unwind with clean_up_file_dialog.

* xterm.h: Declare x_menu_in_use, x_menu_set_in_use,
x_menu_wait_for_event.

* xmenu.c (x_menu_in_use, x_menu_set_in_use): New functions.

src/ChangeLog
src/xmenu.c
src/xterm.h

index 3a8260b05848fe31e7bade4facb99bf190fb1c3d..1544baf53c6692430eae956332c1189ce80bcd87 100644 (file)
@@ -1,3 +1,15 @@
+2004-11-14  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * gtkutil.c (pop_down_file_dialog): Add BLOCK_INPUT.
+
+       * xfns.c (Fx_file_dialog): Call x_menu_in_use and x_menu_set_in_use.
+       Record unwind with clean_up_file_dialog.
+
+       * xterm.h: Declare x_menu_in_use, x_menu_set_in_use,
+       x_menu_wait_for_event.
+
+       * xmenu.c (x_menu_in_use, x_menu_set_in_use): New functions.
+
 2004-11-13  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * gtkutil.c (xg_file_sel_ok, xg_file_sel_cancel)
index c8c40a472562ef2c67128d2bb5249c67dd934d0a..38f101ec260d4e62feab48f449d2183acc963ba7 100644 (file)
@@ -1118,9 +1118,26 @@ on the left of the dialog box and all following items on the right.
 
 #ifndef MSDOS
 
+/* Return non-zero if a dialog or popup menu is already popped up.  */
+
+int
+x_menu_in_use ()
+{
+  return ! NILP (menu_items_inuse);
+}
+
+/* Set menu_items_inuse so no other popup menu or dialog is created.  */
+
+void
+x_menu_set_in_use (in_use)
+     int in_use;
+{
+  menu_items_inuse = in_use ? Qt : Qnil;
+}
+
 /* Wait for an X event to arrive or for a timer to expire.  */
 
-static void
+void
 x_menu_wait_for_event (void *data)
 {
   extern EMACS_TIME timer_check P_ ((int));
index 5dd3ecfdef76d6525570744d9ab2c7f951b81ba8..0738f8475633f07905e17d39af30cb53921f951b 100644 (file)
@@ -1069,6 +1069,9 @@ extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap,
 
 /* Defined in xmenu.c */
 
+extern int x_menu_in_use P_ ((void));
+extern void x_menu_set_in_use P_ ((int));
+extern void x_menu_wait_for_event P_ ((void *data));
 extern void x_activate_menubar P_ ((struct frame *));
 extern int popup_activated P_ ((void));
 extern void initialize_frame_menubar P_ ((struct frame *));