qulogic/libgnt

Improve resizing a box.

2010-03-24, Sadrul Habib Chowdhury
11f5e4943b5b
Improve resizing a box.

libgnt used to always change the size of the first widget. So in a lot of
dialogs (e.g. the log viewer, the add-buddy dialogs etc.) only the labels
would be resized, and the entry/comboboxes, resizing which would be more
useful, would never be resized. So change that behaviour to cycle through
all the widgets in the box for resize.

Fixes #11580, #7843.
#include <ncurses.h>
int main()
{
int ch;
initscr();
noecho();
cbreak();
refresh();
WINDOW *win = newpad(20, 30);
box(win, 0, 0);
prefresh(win, 0, 0, 0, 0, 19, 29);
doupdate();
while ((ch = getch())) {
printw("%d ", ch);
refresh();
}
endwin();
return 0;
}