diff options
Diffstat (limited to 'scripts/kconfig/lxdialog/yesno.c')
-rw-r--r-- | scripts/kconfig/lxdialog/yesno.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/kconfig/lxdialog/yesno.c b/scripts/kconfig/lxdialog/yesno.c index 8364f9dd01c3..ee0a04e3e012 100644 --- a/scripts/kconfig/lxdialog/yesno.c +++ b/scripts/kconfig/lxdialog/yesno.c | |||
@@ -44,6 +44,12 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width) | |||
44 | int i, x, y, key = 0, button = 0; | 44 | int i, x, y, key = 0, button = 0; |
45 | WINDOW *dialog; | 45 | WINDOW *dialog; |
46 | 46 | ||
47 | do_resize: | ||
48 | if (getmaxy(stdscr) < (height + 4)) | ||
49 | return -ERRDISPLAYTOOSMALL; | ||
50 | if (getmaxx(stdscr) < (width + 4)) | ||
51 | return -ERRDISPLAYTOOSMALL; | ||
52 | |||
47 | /* center dialog box on screen */ | 53 | /* center dialog box on screen */ |
48 | x = (COLS - width) / 2; | 54 | x = (COLS - width) / 2; |
49 | y = (LINES - height) / 2; | 55 | y = (LINES - height) / 2; |
@@ -96,6 +102,10 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width) | |||
96 | case KEY_ESC: | 102 | case KEY_ESC: |
97 | key = on_key_esc(dialog); | 103 | key = on_key_esc(dialog); |
98 | break; | 104 | break; |
105 | case KEY_RESIZE: | ||
106 | delwin(dialog); | ||
107 | on_key_resize(); | ||
108 | goto do_resize; | ||
99 | } | 109 | } |
100 | } | 110 | } |
101 | 111 | ||