Fix SIGWINCH handling

curses is dumb.
master
C. McEnroe 2020-02-05 17:58:49 -05:00
parent 6e679bdf26
commit 2d5f608cc5
1 changed files with 3 additions and 2 deletions

5
chat.c
View File

@ -122,11 +122,12 @@ int main(int argc, char *argv[]) {
if (signals[SIGHUP] || signals[SIGINT] || signals[SIGTERM]) {
break;
}
// FIXME: Display doesn't update properly when receiving many of these
// until some input?
if (signals[SIGWINCH]) {
signals[SIGWINCH] = 0;
cursesWinch(SIGWINCH);
// XXX: For some reason, calling uiDraw() here is the only way to
// get uiRead() to properly receive KEY_RESIZE.
uiDraw();
uiRead();
}