terminal_mux: Clear terminal when activating menu
This patch clears the terminal each time the menu appears and thereby wipes away artifacts that might occur when combining terminal_mux with kdb_uart_drv and the kernel prints messages directly.
This commit is contained in:
parent
ff3b73825d
commit
5600328d83
|
@ -610,6 +610,7 @@ void Session_manager::activate_menu()
|
||||||
_menu.reset_selection();
|
_menu.reset_selection();
|
||||||
_registry.to_front(&_menu);
|
_registry.to_front(&_menu);
|
||||||
_status_window.label(_menu.label());
|
_status_window.label(_menu.label());
|
||||||
|
_ncurses.clear_ok();
|
||||||
_menu.flush_all();
|
_menu.flush_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,12 @@ Ncurses::Window *Ncurses::create_window(int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Ncurses::clear_ok()
|
||||||
|
{
|
||||||
|
clearok(stdscr, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Ncurses::do_update()
|
void Ncurses::do_update()
|
||||||
{
|
{
|
||||||
doupdate();
|
doupdate();
|
||||||
|
|
|
@ -45,6 +45,8 @@ class Ncurses
|
||||||
|
|
||||||
Window *create_window(int x, int y, int w, int h);
|
Window *create_window(int x, int y, int w, int h);
|
||||||
|
|
||||||
|
void clear_ok();
|
||||||
|
|
||||||
void do_update();
|
void do_update();
|
||||||
|
|
||||||
Ncurses();
|
Ncurses();
|
||||||
|
|
Loading…
Reference in New Issue