>>>>> On Thu, 15 Mar 2007 18:22:13 +0000, David Reitter <[EMAIL PROTECTED]> >>>>> said:
> A message should appear in the echo area. Then, select "Help" -> > "Copying Conditions" (with the mouse). Result for me is that the > license file is NOT displayed. > Note that it works if the message displayed has only one line. > This is a test case of a more general bug where the first selection > of any (?) menu item is ignored after a multi-line message has been > displayed. It has been reported by several Aquamacs users, but the > above code reproduces the bug with an unpatched GNU Emacs (Carbon). Thanks for minimizing the problematic case. This is because show_help_echo called from menu_target_item_handler (in macmenu.c) indirectly calls redisplay_internal in the above case, and then set_frame_menubar (in macmenu.c) clears f->menu_bar_items_used. YAMAMOTO Mitsuharu [EMAIL PROTECTED] *** src/xdisp.c.~1.1142.~ Sat Mar 10 10:46:41 2007 --- src/xdisp.c Fri Mar 16 17:02:48 2007 *************** redisplay_internal (preserve_echo_area) *** 10872,10878 **** return; } ! #if defined (USE_X_TOOLKIT) || defined (USE_GTK) if (popup_activated ()) return; #endif --- 10872,10878 ---- return; } ! #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (MAC_OS) if (popup_activated ()) return; #endif *************** note_mouse_highlight (f, x, y) *** 22672,22678 **** struct buffer *b; /* When a menu is active, don't highlight because this looks odd. */ ! #if defined (USE_X_TOOLKIT) || defined (USE_GTK) if (popup_activated ()) return; #endif --- 22672,22678 ---- struct buffer *b; /* When a menu is active, don't highlight because this looks odd. */ ! #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (MAC_OS) if (popup_activated ()) return; #endif *** src/macmenu.c.~1.55.~ Fri Feb 23 17:26:43 2007 --- src/macmenu.c Fri Mar 16 17:03:12 2007 *************** static int menu_items_n_panes; *** 259,264 **** --- 259,267 ---- /* Current depth within submenus. */ static int menu_items_submenu_depth; + /* Nonzero means a menu is currently active. */ + static int popup_activated_flag; + /* This is set nonzero after the user activates the menu bar, and set to zero again after the menu bars are redisplayed by prepare_menu_bar. While it is nonzero, all calls to set_frame_menubar go deep. *************** x_activate_menubar (f) *** 1141,1147 **** --- 1144,1152 ---- set_frame_menubar (f, 0, 1); BLOCK_INPUT; + popup_activated_flag = 1; menu_choice = MenuSelect (saved_menu_event_location); + popup_activated_flag = 0; menu_id = HiWord (menu_choice); menu_item = LoWord (menu_choice); *************** mac_menu_show (f, x, y, for_click, keyma *** 2237,2243 **** --- 2242,2250 ---- install_menu_quit_handler (MAC_MENU_POPUP_SUB, menu); /* Display the menu. */ + popup_activated_flag = 1; menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0); + popup_activated_flag = 0; /* Get the refcon to find the correct item */ if (menu_item_choice) *************** dispose_menus (kind, id) *** 3218,3223 **** --- 3225,3238 ---- #endif /* HAVE_MENUS */ + /* Detect if a menu is currently active. */ + + int + popup_activated () + { + return popup_activated_flag; + } + /* The following is used by delayed window autoselection. */ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug