aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog/yesno.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/lxdialog/yesno.c')
-rw-r--r--scripts/kconfig/lxdialog/yesno.c10
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)
int i, x, y, key = 0, button = 0;
WINDOW *dialog;
+do_resize:
+ if (getmaxy(stdscr) < (height + 4))
+ return -ERRDISPLAYTOOSMALL;
+ if (getmaxx(stdscr) < (width + 4))
+ return -ERRDISPLAYTOOSMALL;
+
/* center dialog box on screen */
x = (COLS - width) / 2;
y = (LINES - height) / 2;
@@ -96,6 +102,10 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
case KEY_ESC:
key = on_key_esc(dialog);
break;
+ case KEY_RESIZE:
+ delwin(dialog);
+ on_key_resize();
+ goto do_resize;
}
}