From 21af8a68c8037673aa7da2350ae1f61dc9634fb0 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 9 Jun 1995 01:11:36 +0000 Subject: [PATCH] (xmenu_show): Do call lw_destroy_all_widgets. (xdialog_show): Likewise. (popup_get_selection): Don't call it here. --- src/xmenu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/xmenu.c b/src/xmenu.c index d6e42039fbe..7e4db362faa 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1083,7 +1083,6 @@ popup_get_selection (initial_event, dpyinfo, id) else if (event.type == KeyPress && dpyinfo->display == event.xbutton.display) { - lw_destroy_all_widgets (id); popup_activated_flag = 0; break; } @@ -1862,13 +1861,11 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) /* Process events that apply to the menu. */ popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id); -#if 0 /* fp turned off the following statement and wrote a comment that it is unnecessary--that the menu has already disappeared. - I observer that is not so. -- rms. */ - /* Make sure the menu disappears. */ + Nowadays the menu disappears ok, all right, but + we need to delete the widgets or multiple ones will pile up. */ lw_destroy_all_widgets (menu_id); -#endif /* Find the selected item, and its pane, to return the proper value. */ @@ -2080,6 +2077,8 @@ xdialog_show (f, keymaps, title, error) /* Process events that apply to the menu. */ popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id); + lw_destroy_all_widgets (dialog_id); + /* Find the selected item, and its pane, to return the proper value. */ if (menu_item_selection != 0) -- 2.39.2