mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
[render] refresh on resize #1687
This commit is contained in:
parent
affece853c
commit
ae2338c7a5
@ -84,11 +84,7 @@ 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;
|
||||
}
|
||||
handoff = true;
|
||||
}
|
||||
}else{
|
||||
if(id == 'L' && q->ni.ctrl){
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user