mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
[demo] handle fps graph as family in case it's pixel #2235
This commit is contained in:
parent
230fb801f0
commit
45255e48d8
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user