X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ui%2Fncurses%2Fnc-cui.c;h=e3422734ebd06d83ec30415b8012c89beb54435a;hb=b49d86901dcdf0a6ddddba7c90d67b62c4acf2f8;hp=107539b32a11a1b5974d70caad18ac5d4c36425d;hpb=37c9aee3ffc02a299d94867df9df8132b09fc611;p=petitboot diff --git a/ui/ncurses/nc-cui.c b/ui/ncurses/nc-cui.c index 107539b..e342273 100644 --- a/ui/ncurses/nc-cui.c +++ b/ui/ncurses/nc-cui.c @@ -16,9 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#if defined(HAVE_CONFIG_H) #include "config.h" - -#define _GNU_SOURCE +#endif #include #include @@ -272,10 +272,8 @@ static bool process_global_keys(struct cui *cui, int key) { switch (key) { case 0xc: - if (cui->current && cui->current->main_ncw) { - redrawwin(cui->current->main_ncw); - wrefresh(cui->current->main_ncw); - } + if (cui->current && cui->current->main_ncw) + wrefresh(curscr); return true; } return false; @@ -298,6 +296,8 @@ static int cui_process_key(void *arg) for (;;) { int c = getch(); + pb_debug("%s: got key %d\n", __func__, c); + if (c == ERR) break; @@ -522,10 +522,14 @@ static void cui_update_sysinfo(struct system_info *sysinfo, void *arg) if (cui->sysinfo_screen) sysinfo_screen_update(cui->sysinfo_screen, sysinfo); - /* ... and do the same with the config screen */ + /* ... and do the same with the config screen... */ if (cui->config_screen) config_screen_update(cui->config_screen, cui->config, sysinfo); + /* ... and the boot editor. */ + if (cui->boot_editor) + boot_editor_update(cui->boot_editor, sysinfo); + cui_update_mm_title(cui); }