summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2004-11-13 23:29:11 +0000
committerJan Djärv <jan.h.d@swipnet.se>2004-11-13 23:29:11 +0000
commitb393528900a561200b14bd3c75d63f3bca1992ef (patch)
treed08ca88c87ee35c65a7f4a66771f9c9b933494c3 /src/xmenu.c
parentcd2531db72eaf9b3a704bda141f9ced898040ce2 (diff)
downloademacs-b393528900a561200b14bd3c75d63f3bca1992ef.tar.gz
* 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.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index c8c40a47256..38f101ec260 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -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));