X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/33a35848c727f088922a7d6fd7400c7db0c20814..bc7a63ab1d89d95508f55f44f23c2adda7a60037:/kernel/fiasco/tool/kconfig/scripts/kconfig/lxdialog/yesno.c diff --git a/kernel/fiasco/tool/kconfig/scripts/kconfig/lxdialog/yesno.c b/kernel/fiasco/tool/kconfig/scripts/kconfig/lxdialog/yesno.c index 4e6e8090c..676fb2f82 100644 --- a/kernel/fiasco/tool/kconfig/scripts/kconfig/lxdialog/yesno.c +++ b/kernel/fiasco/tool/kconfig/scripts/kconfig/lxdialog/yesno.c @@ -45,14 +45,14 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width) WINDOW *dialog; do_resize: - if (getmaxy(stdscr) < (height + 4)) + if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN)) return -ERRDISPLAYTOOSMALL; - if (getmaxx(stdscr) < (width + 4)) + if (getmaxx(stdscr) < (width + YESNO_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);