[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/47402: wresize(3) loses window colour attributes
>Synopsis: wresize(3) loses window colour attributes
>Arrival-Date: Fri Jan 04 01:25:00 +0000 2013
>Originator: Julian Fagir
When you set a colour with wattron and wbkgd and then resize the window with
wresize, it loses its colour, you have to re-set it.
This behaviour is different in nbcurses to ncurses, which holds the colour. If
this is meant by the sentence "The application must redraw the window after it
has been resized.", it should be clarified more.
Anyway, it is an incompatibility with ncurses.
So fixing or documenting this, which is the way to go?
Compile the following code with `-lcurses`. Run it on ncurses and see a shiny
white-on-blue screen. Run it with nbcurses and see a not-so-shiny blue screen
with a large black window in it.
main(int arg, char *argv)
int ch, j, i = 0;
mainwin = newwin(20, 70, 2, 2);
box(mainwin, 0, 0);
mvwprintw(mainwin, 1, 1, "Creating window...");
init_pair(1, COLOR_WHITE, COLOR_BLUE);
wborder(mainwin, 0, 0, 0, 0, 0, 0, 0, 0);
mvwin(mainwin, 2, 2);
wresize(mainwin, 20, 70);
Main Index |
Thread Index |