ref: ccfa58d6523fe63722425b2016b76fc5ba1bd80e
parent: ecdfcae686b31e9a1953955ec989e87ed3640bb6
author: cancel <cancel@cancel.fm>
date: Thu Dec 13 20:57:47 EST 2018
Fix flicker when opening/closing submenus
--- a/term_util.c
+++ b/term_util.c
@@ -181,6 +181,10 @@
}
void qnav_free_block(Qblock* qb) {
+ // erase any stuff underneath where this window is, in case it's outside of
+ // the grid in an area that isn't actively redraw
+ werase(qb->outer_window);
+ wnoutrefresh(qb->outer_window);
switch (qb->tag) {
case Qblock_type_qmsg: {
Qmsg* qm = qmsg_of(qb);
--- a/tui_main.c
+++ b/tui_main.c
@@ -1726,10 +1726,8 @@
ged_apply_delta_secs(&ged_state, stm_sec(diff));
ged_do_stuff(&ged_state);
bool drew_any = false;
- if (qnav_stack.stack_changed) {
- werase(stdscr);
+ if (qnav_stack.stack_changed)
drew_any = true;
- }
if (ged_is_draw_dirty(&ged_state) || drew_any) {
werase(cont_window);
ged_draw(&ged_state, cont_window);