[demo] handle fps graph as family in case it's pixel #2235

This commit is contained in:
nick black 2021-10-05 00:52:36 -04:00 committed by nick black
parent 230fb801f0
commit 45255e48d8

View File

@ -227,10 +227,10 @@ fpsplot_toggle(struct notcurses* nc){
} }
plot_hidden = !plot_hidden; plot_hidden = !plot_hidden;
if(plot_hidden){ if(plot_hidden){
ncplane_reparent(ncuplot_plane(plot), ncuplot_plane(plot)); ncplane_reparent_family(ncuplot_plane(plot), ncuplot_plane(plot));
}else{ }else{
ncplane_reparent(ncuplot_plane(plot), notcurses_stdplane(nc)); ncplane_reparent_family(ncuplot_plane(plot), notcurses_stdplane(nc));
ncplane_move_top(ncuplot_plane(plot)); ncplane_move_family_top(ncuplot_plane(plot));
} }
return demo_render(nc); return demo_render(nc);
} }
@ -680,7 +680,7 @@ int fpsgraph_init(struct notcurses* nc){
clock_gettime(CLOCK_MONOTONIC, &ts); clock_gettime(CLOCK_MONOTONIC, &ts);
plottimestart = timespec_to_ns(&ts); plottimestart = timespec_to_ns(&ts);
if(plot_hidden){ if(plot_hidden){
ncplane_reparent(ncuplot_plane(plot), ncuplot_plane(plot)); ncplane_reparent_family(ncuplot_plane(plot), ncuplot_plane(plot));
} }
return 0; return 0;
} }