Search code examples
ncurses

ncurses: how to refresh a single panel


when using ncurses without panels, one can use wrefresh and wnoutrefresh to refresh a single window; but come with panels is another function update_panels, which seems to do the same thing as wnoutrefresh, but for all panels, and taking the stack order into account;

its man page says:

Use this function and not wrefresh or wnoutrefresh.

my question is: is it possible to refresh a single panel, like a single window, without calling update_panels? i tried both wrefresh and wnoutrefresh on a single panel but the result looks weird with both functions;

fyi: i would like to refresh a single panel instead of all panels because i think this may incur less overhead, but i am not sure if this is true or important; if performance is not an issue i think i am ok with refreshing all panels using update_panels;


Solution

  • no, you cannot do that (ncurses will only repaint things that have changed, and unlike the window-oriented calls, update_panels takes into account overlapping panels)