From: Andrew Choi Date: Tue, 4 Sep 2001 06:19:12 +0000 (+0000) Subject: 2001-09-04 Andrew Choi X-Git-Tag: emacs-pretest-21.0.106~259 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3428f2c48a370de1a8500c6f4f2a70fff2fe9df4;p=emacs.git 2001-09-04 Andrew Choi * src/macmenu.c (mac_menu_show): Use refcon of selected menu item. --- diff --git a/mac/ChangeLog b/mac/ChangeLog index 1ae1c7fdca8..e1efa1b8cd6 100644 --- a/mac/ChangeLog +++ b/mac/ChangeLog @@ -1,5 +1,7 @@ 2001-09-04 Andrew Choi + * src/macmenu.c (mac_menu_show): Use refcon of selected menu item. + * src/macterm.c (XTread_socket): Read all pending events in the event queue instead of one. diff --git a/mac/src/macmenu.c b/mac/src/macmenu.c index 41536e466aa..bf695214267 100644 --- a/mac/src/macmenu.c +++ b/mac/src/macmenu.c @@ -1702,14 +1702,13 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) SetPort (FRAME_MAC_WINDOW (f)); LocalToGlobal (&pos); - /* No selection has been chosen yet. */ - menu_item_selection = 0; - InsertMenu (menu, -1); /* Display the menu. */ menu_item_selection = LoWord (PopUpMenuSelect (menu, pos.v, pos.h, 0)); + GetMenuItemRefCon (menu, menu_item_selection, &menu_item_selection); + DeleteMenu (POPUP_SUBMENU_ID); #if 0