* xmenu.c (x_menu_wait_for_event): New function.
(popup_get_selection, popup_widget_loop): Call x_menu_wait_for_event
to handle timers.
+ (popup_widget_loop): Add argument do_timers.
+ (create_and_show_popup_menu, create_and_show_dialog): Pass 1 for
+ do_timers to popup_widget_loop.
(xmenu_show): Call XMenuActivateSetWaitFunction so that
x_menu_wait_for_event is called by XMenuActivate.
+ (create_and_show_popup_menu): Pass 1 for do_timers to
+ popup_get_selection.
2004-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
two. show_help_echo uses this to detect popup menus. */
popup_activated_flag = 1;
/* Process events that apply to the menu. */
- popup_widget_loop (0);
+ popup_widget_loop (1);
gtk_widget_destroy (menu);
popup_activated_flag = 1;
/* Process events that apply to the menu. */
- popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0, 0);
+ popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1, 0);
/* fp turned off the following statement and wrote a comment
that it is unnecessary--that the menu has already disappeared.