From 3428f2c48a370de1a8500c6f4f2a70fff2fe9df4 Mon Sep 17 00:00:00 2001 From: Andrew Choi Date: Tue, 4 Sep 2001 06:19:12 +0000 Subject: [PATCH] 2001-09-04 Andrew Choi * src/macmenu.c (mac_menu_show): Use refcon of selected menu item. --- mac/ChangeLog | 2 ++ mac/src/macmenu.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.2