X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-textscreen.c;h=55428e791986d102665fc0aaa42fa36addea3fda;hp=4ae0db42dfb989c824a5ddb1e2a036bdb6bcd35d;hb=c005b174aa484ecafdbd403af80ea7375b67bc31;hpb=494988c501287e03da3becba5c03cbce7c3d9d20 diff --git a/ui/ncurses/nc-textscreen.c b/ui/ncurses/nc-textscreen.c index 4ae0db4..55428e7 100644 --- a/ui/ncurses/nc-textscreen.c +++ b/ui/ncurses/nc-textscreen.c @@ -174,7 +174,7 @@ struct nc_scr *text_screen_scr(struct text_screen *screen) } void text_screen_set_help(struct text_screen *screen, const char *title, - const char *text) + const struct help_text *text) { screen->help_title = title; screen->help_text = text; @@ -183,6 +183,13 @@ void text_screen_set_help(struct text_screen *screen, const char *title, static int text_screen_post(struct nc_scr *scr) { + struct text_screen *screen = text_screen_from_scr(scr); + + if (screen->need_update) { + text_screen_draw(screen); + screen->need_update = false; + } + nc_scr_frame_draw(scr); redrawwin(scr->main_ncw); wrefresh(scr->main_ncw); @@ -202,6 +209,7 @@ void text_screen_init(struct text_screen *screen, struct cui *cui, screen->cui = cui; screen->on_exit = on_exit; + screen->need_update = false; screen->scr.frame.ltitle = talloc_strdup(screen, title); screen->scr.frame.rtitle = NULL;