diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index bbf364cd4..59004e21f 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -246,7 +246,18 @@ mswin_menu_window_select_menu(HWND hWnd, int how, MENU_ITEM_P **_selected, data->is_active = FALSE; LayoutMenu(hWnd); // hide dialog buttons mswin_popup_destroy(hWnd); + + /* If we just used the permanent inventory window to pick something, + * set the menu back to its display inventory state. + */ + if (flags.perm_invent && mswin_winid_from_handle(hWnd) == WIN_INVEN + && how != PICK_NONE) { + data->menu.prompt[0] = '\0'; + SetMenuListType(hWnd, PICK_NONE); + LayoutMenu(hWnd); + } } + return ret_val; } /*-----------------------------------------------------------------------------*/ diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index db045a4cc..1b208053a 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -2202,7 +2202,10 @@ mswin_popup_destroy(HWND hWnd) } DrawMenuBar(GetNHApp()->hMainWnd); - ShowWindow(hWnd, SW_HIDE); + /* Don't hide the permanent inventory window ... leave it showing */ + if (!flags.perm_invent || mswin_winid_from_handle(hWnd) != WIN_INVEN) + ShowWindow(hWnd, SW_HIDE); + GetNHApp()->hPopupWnd = NULL; mswin_layout_main_window(hWnd);