From cc1da582a5ab34be8477bd0dfa014e330e151bcd Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Mon, 24 Oct 1994 04:14:23 +0000 Subject: [PATCH] label.c: add delwin(window) mbr.c: use proper dims for newwin, add shadow both: add ' ' and ESC as valid end-keys --- sbin/sysinstall/label.c | 3 ++- sbin/sysinstall/mbr.c | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sbin/sysinstall/label.c b/sbin/sysinstall/label.c index 51d5d73c668..928ffce4c08 100644 --- a/sbin/sysinstall/label.c +++ b/sbin/sysinstall/label.c @@ -67,8 +67,9 @@ display_disklabel(int disk) dialog_update(); - while (key != '\n') + while (key != '\n' && key != ' ' && key != '\033') key = wgetch(window); + delwin(window); dialog_clear(); dialog_update(); } diff --git a/sbin/sysinstall/mbr.c b/sbin/sysinstall/mbr.c index 240cb4d64e2..c42965cceeb 100644 --- a/sbin/sysinstall/mbr.c +++ b/sbin/sysinstall/mbr.c @@ -94,7 +94,9 @@ show_mbr(struct mbr *mbr) int x, y; WINDOW *window; - window = newwin(LINES, COLS, 0, 0); + if (use_shadow) + draw_shadow(stdscr, 1, 1, LINES-2, COLS-2); + window = newwin(LINES-2, COLS-2, 1, 1); keypad(window, TRUE); draw_box(window, 1, 1, LINES - 2, COLS - 2, @@ -122,14 +124,14 @@ show_mbr(struct mbr *mbr) mvwprintw(window, y+5, x, "Size (in sectors) %ld", mbr->dospart[(i*2)+j].dp_size); } } - refresh(); + dialog_update(); - while (key != '\n') + while (key != '\n' && key != ' ' && key != '\033') key = wgetch(window); delwin(window); - refresh(); dialog_clear(); + dialog_update(); } int