X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=scripts%2Fkconfig%2Flxdialog%2Finputbox.c;h=447a582198c9bc70c37c4d2d034b128b5a62080d;hb=b4294eecb2785a3e1d4c8fde3403f4fc4ca2dc21;hp=21404a04d7c34dc37d9f29ffe804b6abeb3f2a62;hpb=2c4cdf5950b1a7a9d731c03c56e2cea3bd8ca7b7;p=cascardo%2Flinux.git diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c index 21404a04d7c3..447a582198c9 100644 --- a/scripts/kconfig/lxdialog/inputbox.c +++ b/scripts/kconfig/lxdialog/inputbox.c @@ -56,14 +56,14 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width strcpy(instr, init); do_resize: - if (getmaxy(stdscr) <= (height - 2)) + if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGTH_MIN)) return -ERRDISPLAYTOOSMALL; - if (getmaxx(stdscr) <= (width - 2)) + if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN)) return -ERRDISPLAYTOOSMALL; /* 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);