diff options
author | Peter Korsgaard <peter@korsgaard.com> | 2013-12-01 20:31:43 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2013-12-01 20:32:00 +0100 |
commit | 50ce7ffb76b989c90636876153e568da7615b8c3 (patch) | |
tree | 1de9424dd5332431d2a30d3aafe332e7c0999476 /support/kconfig/lxdialog/textbox.c | |
parent | 9b3904543ca04c5d5fe5f6974539eed376de2290 (diff) | |
parent | cb08d7b05db54eb7b2c52deabbd57c541777a422 (diff) | |
download | buildroot-50ce7ffb76b989c90636876153e568da7615b8c3.tar.gz buildroot-50ce7ffb76b989c90636876153e568da7615b8c3.zip |
Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support/kconfig/lxdialog/textbox.c')
-rw-r--r-- | support/kconfig/lxdialog/textbox.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/support/kconfig/lxdialog/textbox.c b/support/kconfig/lxdialog/textbox.c index a48bb93e09..1773319b95 100644 --- a/support/kconfig/lxdialog/textbox.c +++ b/support/kconfig/lxdialog/textbox.c @@ -80,7 +80,7 @@ int dialog_textbox(const char *title, char *tbuf, int initial_height, do_resize: getmaxyx(stdscr, height, width); - if (height < 8 || width < 8) + if (height < TEXTBOX_HEIGTH_MIN || width < TEXTBOX_WIDTH_MIN) return -ERRDISPLAYTOOSMALL; if (initial_height != 0) height = initial_height; @@ -98,8 +98,8 @@ do_resize: width = 0; /* 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); |