X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=scripts%2Fkconfig%2Flxdialog%2Fmenubox.c;h=c93de0b2faca28525588bceb023f99bdd8a14acf;hb=b202c0d5205662fd96f7151afa83f891f2f4d542;hp=38cd69c5660e5163bfc402617de0d702e3372bd6;hpb=ad4f496b445eac30bb6ddc72599bf6dd73529cd2;p=cascardo%2Flinux.git diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c index 38cd69c5660e..c93de0b2faca 100644 --- a/scripts/kconfig/lxdialog/menubox.c +++ b/scripts/kconfig/lxdialog/menubox.c @@ -193,7 +193,7 @@ int dialog_menu(const char *title, const char *prompt, do_resize: height = getmaxy(stdscr); width = getmaxx(stdscr); - if (height < 15 || width < 65) + if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN) return -ERRDISPLAYTOOSMALL; height -= 4; @@ -203,8 +203,8 @@ do_resize: max_choice = MIN(menu_height, item_count()); /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; draw_shadow(stdscr, y, x, height, width);