X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ui%2Fncurses%2Fnc-config.c;h=c45df34e9afce17f5d641206bade8923e3bff252;hb=a240e296ac2ecf8934f71cb23946fc77101cdfd6;hp=17cc380172cb15394fb0b3bb73b84cfd270d8d4d;hpb=67eaf20d50922e9f745e01a8d6d99fb9c3ea3bec;p=petitboot diff --git a/ui/ncurses/nc-config.c b/ui/ncurses/nc-config.c index 17cc380..c45df34 100644 --- a/ui/ncurses/nc-config.c +++ b/ui/ncurses/nc-config.c @@ -57,6 +57,7 @@ struct config_screen { bool exit; bool show_help; + bool need_redraw; void (*on_exit)(struct cui *); int scroll_y; @@ -146,6 +147,7 @@ static void config_screen_process_key(struct nc_scr *scr, int key) } else if (screen->show_help) { screen->show_help = false; + screen->need_redraw = true; cui_show_help(screen->cui, _("System Configuration"), &config_help_text); @@ -165,7 +167,10 @@ static int config_screen_post(struct nc_scr *scr) struct config_screen *screen = config_screen_from_scr(scr); widgetset_post(screen->widgetset); nc_scr_frame_draw(scr); - redrawwin(scr->main_ncw); + if (screen->need_redraw) { + redrawwin(scr->main_ncw); + screen->need_redraw = false; + } wrefresh(screen->scr.main_ncw); pad_refresh(screen); return 0; @@ -859,6 +864,7 @@ struct config_screen *config_screen_init(struct cui *cui, screen->cui = cui; screen->on_exit = on_exit; + screen->need_redraw = false; screen->label_x = 2; screen->field_x = 17;