Mercurial > emacs
comparison src/xmenu.c @ 58202:54c649507b74
* 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.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Sat, 13 Nov 2004 23:29:11 +0000 |
parents | 6c24ca598cb1 |
children | 8f529503ae83 |
comparison
equal
deleted
inserted
replaced
58201:d433adb0e42c | 58202:54c649507b74 |
---|---|
1116 } | 1116 } |
1117 | 1117 |
1118 | 1118 |
1119 #ifndef MSDOS | 1119 #ifndef MSDOS |
1120 | 1120 |
1121 /* Return non-zero if a dialog or popup menu is already popped up. */ | |
1122 | |
1123 int | |
1124 x_menu_in_use () | |
1125 { | |
1126 return ! NILP (menu_items_inuse); | |
1127 } | |
1128 | |
1129 /* Set menu_items_inuse so no other popup menu or dialog is created. */ | |
1130 | |
1131 void | |
1132 x_menu_set_in_use (in_use) | |
1133 int in_use; | |
1134 { | |
1135 menu_items_inuse = in_use ? Qt : Qnil; | |
1136 } | |
1137 | |
1121 /* Wait for an X event to arrive or for a timer to expire. */ | 1138 /* Wait for an X event to arrive or for a timer to expire. */ |
1122 | 1139 |
1123 static void | 1140 void |
1124 x_menu_wait_for_event (void *data) | 1141 x_menu_wait_for_event (void *data) |
1125 { | 1142 { |
1126 extern EMACS_TIME timer_check P_ ((int)); | 1143 extern EMACS_TIME timer_check P_ ((int)); |
1127 | 1144 |
1128 /* Another way to do this is to register a timer callback, that can be | 1145 /* Another way to do this is to register a timer callback, that can be |