- set_menu_win(new_popup_menu, popup_win);
- set_menu_focus(new_popup_menu, 1);
-
- return new_popup_menu;
-}
+ int popup_maxheight, popup_maxwidth;
+ getmaxyx(popupmenu_win, popup_maxheight, popup_maxwidth);
+ popupmenu_menu_win = derwin(
+ popupmenu_win,
+ popup_maxheight-POPUP_MENU_PAD_TOP-POPUP_MENU_PAD_BOTTOM,
+ popup_maxwidth-POPUP_MENU_PAD_LEFT-POPUP_MENU_PAD_RIGHT,
+ POPUP_MENU_PAD_TOP,
+ POPUP_MENU_PAD_LEFT
+ );