summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-cui.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-09-02 15:43:39 +1000
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-09-07 16:55:52 +1000
commit9384b0ab3b9bec1744c19c64ac5431db99110b04 (patch)
treeb5fed2d89b6a3cc20a10e9cbc007913dae09b1e8 /ui/ncurses/nc-cui.c
parent72148c718113a17d80fd1da3c8dd82b471bed07a (diff)
downloadtalos-petitboot-9384b0ab3b9bec1744c19c64ac5431db99110b04.tar.gz
talos-petitboot-9384b0ab3b9bec1744c19c64ac5431db99110b04.zip
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 <sam.mj@au1.ibm.com>
Diffstat (limited to 'ui/ncurses/nc-cui.c')
-rw-r--r--ui/ncurses/nc-cui.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/ncurses/nc-cui.c b/ui/ncurses/nc-cui.c
index 56e7653..c975c0f 100644
--- a/ui/ncurses/nc-cui.c
+++ b/ui/ncurses/nc-cui.c
@@ -698,6 +698,9 @@ static void cui_update_sysinfo(struct system_info *sysinfo, void *arg)
if (cui->sysinfo_screen)
sysinfo_screen_update(cui->sysinfo_screen, sysinfo);
+ if (cui->subset_screen)
+ subset_screen_update(cui->subset_screen);
+
/* ... and do the same with the config screen... */
if (cui->config_screen)
config_screen_update(cui->config_screen, cui->config, sysinfo);
@@ -744,6 +747,9 @@ static void cui_update_config(struct config *config, void *arg)
if (config->lang)
cui_update_language(cui, config->lang);
+ if (cui->subset_screen)
+ subset_screen_update(cui->subset_screen);
+
if (cui->config_screen)
config_screen_update(cui->config_screen, config, cui->sysinfo);
OpenPOWER on IntegriCloud