changeset 12149:f1585a0ecd0c

(xmenu_show): Do call lw_destroy_all_widgets. (xdialog_show): Likewise. (popup_get_selection): Don't call it here.
author Karl Heuer <kwzh@gnu.org>
date Fri, 09 Jun 1995 01:11:36 +0000
parents a1c38b9b0f73
children 64b16f71a15c
files src/xmenu.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Fri Jun 09 01:10:11 1995 +0000
+++ b/src/xmenu.c	Fri Jun 09 01:11:36 1995 +0000
@@ -1083,7 +1083,6 @@
       else if (event.type == KeyPress
 	       && dpyinfo->display == event.xbutton.display)
 	{
-	  lw_destroy_all_widgets (id); 
 	  popup_activated_flag = 0;
 	  break;
 	}
@@ -1862,13 +1861,11 @@
   /* 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 @@
   /* 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)