From 9384b0ab3b9bec1744c19c64ac5431db99110b04 Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Wed, 2 Sep 2015 15:43:39 +1000 Subject: ui/ncurses: Improve update handling in nested screens Several screens in petitboot-nc require an update if a config or sysinfo update is received. However if those screens exist but are not the current screen they will incorrectly try to draw to the screen. Where the currently active screen is a textscreen (eg. a help screen) the update is delayed until after the screen is exited. In the particular case of nc-config where the current screen can be an nc-subset screen, the nc-subset screen is exited immediately so the update can be performed, since the nc-subset screen depends on the information in the previous screen. Signed-off-by: Samuel Mendoza-Jonas --- ui/ncurses/nc-textscreen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ui/ncurses/nc-textscreen.h') diff --git a/ui/ncurses/nc-textscreen.h b/ui/ncurses/nc-textscreen.h index 25107cb..df47186 100644 --- a/ui/ncurses/nc-textscreen.h +++ b/ui/ncurses/nc-textscreen.h @@ -28,6 +28,7 @@ struct text_screen { int n_lines; int n_alloc_lines; int scroll_y; + bool need_update; const char *help_title; const struct help_text *help_text; void (*on_exit)(struct cui *); -- cgit v1.2.1