From b2a916a0f4be7baad98e2498c2ef7618f39e51b9 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 22 Feb 2007 22:49:41 +0000 Subject: [PATCH] (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. --- src/w32menu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/w32menu.c b/src/w32menu.c index a3bd82a0d7d..b977b90e52d 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -129,7 +129,7 @@ typedef struct _widget_value #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 @@ menubar_selection_callback (FRAME_PTR f, void * client_data) buf.kind = MENU_BAR_EVENT; buf.frame_or_window = frame; buf.arg = entry; - 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; + kbd_buffer_store_event (&buf); + f->output_data.w32->menubar_active = 0; return; } @@ -1080,7 +1079,6 @@ menubar_selection_callback (FRAME_PTR f, void * client_data) } /* 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; } -- 2.39.5