Slight tidying of resizing terminal handling.
authormdw <mdw>
Tue, 27 Jul 1999 12:49:16 +0000 (12:49 +0000)
committermdw <mdw>
Tue, 27 Jul 1999 12:49:16 +0000 (12:49 +0000)
src/pres_curses.c

index 81f21e5..f0a14d0 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: pres_curses.c,v 1.4 1999/07/16 16:52:28 mdw Exp $
+ * $Id: pres_curses.c,v 1.5 1999/07/27 12:49:16 mdw Exp $
  *
  * Curses-based output presentation
  *
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: pres_curses.c,v $
- * Revision 1.4  1999/07/16 16:52:28  mdw
+ * Revision 1.5  1999/07/27 12:49:16  mdw
+ * Slight tidying of resizing terminal handling.
+ *
+ * Revision 1.4  1999/07/16  16:52:28  mdw
  * `wbkdset' doesn't work so well.  Use `wbkgd' instead.
  *
  * Revision 1.3  1999/07/16 12:49:58  mdw
@@ -150,15 +153,17 @@ static void sig_cont(int s)
 
 /* --- @sig_winch@ --- */
 
-#ifdef HAVE_WRESIZE
+#ifdef SIGWINCH
 
 static void sig_winch(int s)
 {
-  cwin *c;
   int e = errno;
 
+#ifdef HAVE_WRESIZE
+  cwin *c;
+
   endwin();
-  refresh();
+  wrefresh(curscr);
   sizes();
   for (c = cwins; c; c = c->next) {
     mvwin(c->w, c->top, 0);
@@ -168,6 +173,10 @@ static void sig_winch(int s)
     wnoutrefresh(c->s);
   }
   doupdate();
+#else
+  endwin();
+  wrefresh(curscr);
+#endif
   errno = e;
 }