changeset 76074:5978a80d504e

(current_popup_menu): Make available globally. (menubar_selection_callback): Free menu strings before pushing the menu event into the keyboard buffer. Remove menu_command_in_progress.
author Jason Rumney <jasonr@gnu.org>
date Thu, 22 Feb 2007 22:49:41 +0000
parents 9c80ddcdba82
children 25965473846d
files src/w32menu.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32menu.c	Thu Feb 22 20:18:17 2007 +0000
+++ b/src/w32menu.c	Thu Feb 22 22:49:41 2007 +0000
@@ -129,7 +129,7 @@
 #define FALSE 0
 #endif /* no TRUE */
 
-static HMENU current_popup_menu;
+HMENU current_popup_menu;
 
 void syms_of_w32menu ();
 void globals_of_w32menu ();
@@ -1067,11 +1067,10 @@
 	      buf.kind = MENU_BAR_EVENT;
 	      buf.frame_or_window = frame;
 	      buf.arg = entry;
+	      /* Free memory used by owner-drawn and help-echo strings.  */
+	      w32_free_menu_strings (FRAME_W32_WINDOW (f));
 	      kbd_buffer_store_event (&buf);
 
-	      /* Free memory used by owner-drawn and help-echo strings.  */
-	      w32_free_menu_strings (FRAME_W32_WINDOW (f));
-	      f->output_data.w32->menu_command_in_progress = 0;
 	      f->output_data.w32->menubar_active = 0;
 	      return;
 	    }
@@ -1080,7 +1079,6 @@
     }
   /* Free memory used by owner-drawn and help-echo strings.  */
   w32_free_menu_strings (FRAME_W32_WINDOW (f));
-  f->output_data.w32->menu_command_in_progress = 0;
   f->output_data.w32->menubar_active = 0;
 }