Commit 86fb1a79 authored by Jason Rumney's avatar Jason Rumney
Browse files

(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.
parent d4b7d6b4
...@@ -1747,9 +1747,6 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) ...@@ -1747,9 +1747,6 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error)
pos.y = y; pos.y = y;
ClientToScreen (FRAME_W32_WINDOW (f), &pos); 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. */ /* No selection has been chosen yet. */
menu_item_selection = 0; menu_item_selection = 0;
...@@ -1762,6 +1759,9 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) ...@@ -1762,6 +1759,9 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error)
during the call. */ during the call. */
discard_mouse_events (); discard_mouse_events ();
/* Free the widget_value objects we used to specify the contents. */
free_menubar_widget_value_tree (first_wv);
DestroyMenu (menu); DestroyMenu (menu);
/* Find the selected item, and its pane, to return /* Find the selected item, and its pane, to return
...@@ -2056,7 +2056,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) ...@@ -2056,7 +2056,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
else else
out_string = wv->name; out_string = wv->name;
if (wv->title || wv->call_data == 0) if (wv->title)
{ {
#if 0 /* no GC while popup menu is active */ #if 0 /* no GC while popup menu is active */
out_string = LocalAlloc (0, strlen (wv->name) + 1); out_string = LocalAlloc (0, strlen (wv->name) + 1);
...@@ -2170,7 +2170,8 @@ w32_menu_display_help (HMENU menu, UINT item, UINT flags) ...@@ -2170,7 +2170,8 @@ w32_menu_display_help (HMENU menu, UINT item, UINT flags)
get_menu_item_info (menu, item, FALSE, &info); get_menu_item_info (menu, item, FALSE, &info);
show_help_echo (info.dwItemData ? show_help_echo (info.dwItemData ?
build_string ((char *) info.dwItemData) : Qnil, 1); build_string ((char *) info.dwItemData) : Qnil,
Qnil, -1, 1);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment