[render] refresh on resize #1687

This commit is contained in:
nick black 2021-11-28 15:38:49 -05:00 committed by nick black
parent affece853c
commit ae2338c7a5
3 changed files with 6 additions and 5 deletions

View File

@ -84,12 +84,8 @@ uint32_t demo_getc(struct notcurses* nc, const struct timespec* ts, ncinput* ni)
if(!menu_or_hud_key(nc, &q->ni)){
if(nckey_mouse_p(q->ni.id)){
if(!handle_mouse(&q->ni)){
if(id == 'L' && q->ni.ctrl){
notcurses_refresh(nc, NULL, NULL);
}else{
handoff = true;
}
}
}else{
if(id == 'L' && q->ni.ctrl){
notcurses_refresh(nc, NULL, NULL);

View File

@ -30,6 +30,7 @@ static sig_atomic_t resize_seen;
void sigwinch_handler(int signo){
if(signo == SIGWINCH){
resize_seen = signo;
sigcont_seen_for_render = 1;
}else if(signo == SIGCONT){
cont_seen = signo;
sigcont_seen_for_render = 1;

View File

@ -249,6 +249,10 @@ void ncplane_dim_yx(const ncplane* n, unsigned* rows, unsigned* cols){
// anyone calling this needs ensure the ncplane's framebuffer is updated
// to reflect changes in geometry. also called at startup for standard plane.
// sets |cgeo_changed| high iff the cell geometry changed (will happen on a
// resize, and on a font resize if the pixel geometry does not change).
// sets |pgeo_changed| high iff the cell-pixel geometry changed (will happen
// on a font resize).
int update_term_dimensions(unsigned* rows, unsigned* cols, tinfo* tcache,
int margin_b, unsigned* cgeo_changed, unsigned* pgeo_changed){
*pgeo_changed = 0;