From: Jason Rumney Date: Sat, 15 Jul 2000 11:52:21 +0000 (+0000) Subject: (w32_menu_show): Call free_menubar_widget_value_tree after menu is X-Git-Tag: emacs-pretest-21.0.90~2809 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=86fb1a79025519e854e50230f88fb0892bce73e8;p=emacs.git (w32_menu_show): Call free_menubar_widget_value_tree after menu is finished with. (add_menu_item): Only consider wv->title as a menu title. (w32_menu_display_help): Add OBJECT and POS to show_help_echo. --- diff --git a/src/w32menu.c b/src/w32menu.c index 995c3ef254b..52baa248a46 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1747,9 +1747,6 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) pos.y = y; ClientToScreen (FRAME_W32_WINDOW (f), &pos); - /* Free the widget_value objects we used to specify the contents. */ - free_menubar_widget_value_tree (first_wv); - /* No selection has been chosen yet. */ menu_item_selection = 0; @@ -1762,6 +1759,9 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) during the call. */ discard_mouse_events (); + /* Free the widget_value objects we used to specify the contents. */ + free_menubar_widget_value_tree (first_wv); + DestroyMenu (menu); /* Find the selected item, and its pane, to return @@ -2056,7 +2056,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) else out_string = wv->name; - if (wv->title || wv->call_data == 0) + if (wv->title) { #if 0 /* no GC while popup menu is active */ out_string = LocalAlloc (0, strlen (wv->name) + 1); @@ -2170,7 +2170,8 @@ w32_menu_display_help (HMENU menu, UINT item, UINT flags) get_menu_item_info (menu, item, FALSE, &info); show_help_echo (info.dwItemData ? - build_string ((char *) info.dwItemData) : Qnil, 1); + build_string ((char *) info.dwItemData) : Qnil, + Qnil, -1, 1); } }