comparison src/w32menu.c @ 69443:c5278c858018

(Fx_popup_menu): Call w32_free_menu_strings when finished with the menu.
author Jason Rumney <jasonr@gnu.org>
date Sun, 12 Mar 2006 16:29:25 +0000
parents 3bd95f4f2941
children 6e63f47b8977 a802c5505156
comparison
equal deleted inserted replaced
69442:f0dce11bc9d2 69443:c5278c858018
817 UNGCPRO; 817 UNGCPRO;
818 return Qnil; 818 return Qnil;
819 } 819 }
820 820
821 #ifdef HAVE_MENUS 821 #ifdef HAVE_MENUS
822 /* If resources from a previous popup menu exist yet, does nothing 822 /* If resources from a previous popup menu still exist, does nothing
823 until the `menu_free_timer' has freed them (see w32fns.c). 823 until the `menu_free_timer' has freed them (see w32fns.c). This
824 can occur if you press ESC or click outside a menu without selecting
825 a menu item.
824 */ 826 */
825 if (current_popup_menu) 827 if (current_popup_menu)
826 { 828 {
827 discard_menu_items (); 829 discard_menu_items ();
828 UNGCPRO; 830 UNGCPRO;
835 selection = w32_menu_show (f, xpos, ypos, for_click, 837 selection = w32_menu_show (f, xpos, ypos, for_click,
836 keymaps, title, &error_name); 838 keymaps, title, &error_name);
837 UNBLOCK_INPUT; 839 UNBLOCK_INPUT;
838 840
839 discard_menu_items (); 841 discard_menu_items ();
842 w32_free_menu_strings (FRAME_W32_WINDOW (f));
843
840 #endif /* HAVE_MENUS */ 844 #endif /* HAVE_MENUS */
841 845
842 UNGCPRO; 846 UNGCPRO;
843 847
844 if (error_name) error (error_name); 848 if (error_name) error (error_name);