# HG changeset patch # User Jan Dj¸«£rv # Date 1100388551 0 # Node ID 54c649507b740d6ace9c9dfe812eb593cd0bf7cc # Parent d433adb0e42c8c78793f76024e2376ab2ad79d3f * 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. diff -r d433adb0e42c -r 54c649507b74 src/ChangeLog --- a/src/ChangeLog Sat Nov 13 23:17:55 2004 +0000 +++ b/src/ChangeLog Sat Nov 13 23:29:11 2004 +0000 @@ -1,3 +1,15 @@ +2004-11-14 Jan Dj,Ad(Brv + + * 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,Ad(Brv * gtkutil.c (xg_file_sel_ok, xg_file_sel_cancel) diff -r d433adb0e42c -r 54c649507b74 src/xmenu.c --- a/src/xmenu.c Sat Nov 13 23:17:55 2004 +0000 +++ b/src/xmenu.c Sat Nov 13 23:29:11 2004 +0000 @@ -1118,9 +1118,26 @@ #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)); diff -r d433adb0e42c -r 54c649507b74 src/xterm.h --- a/src/xterm.h Sat Nov 13 23:17:55 2004 +0000 +++ b/src/xterm.h Sat Nov 13 23:29:11 2004 +0000 @@ -1069,6 +1069,9 @@ /* 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 *));