]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_setup.c
ncurses 5.9 - patch 20120707
[ncurses.git] / ncurses / tinfo / lib_setup.c
index de4cb459728ab908f9393cdf6125b9dc30c94a1e..166b9689813a16a8d6922dbeb58cdc0732983881 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -47,7 +47,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.142 2011/10/22 16:13:06 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.145 2012/07/07 20:35:27 tom Exp $")
 
 /****************************************************************************
  *
@@ -399,8 +399,11 @@ _nc_update_screensize(SCREEN *sp)
      */
     if (sp != 0
        && sp->_resize != 0) {
-       if ((new_lines != old_lines) || (new_cols != old_cols))
+       if ((new_lines != old_lines) || (new_cols != old_cols)) {
            sp->_resize(NCURSES_SP_ARGx new_lines, new_cols);
+       } else if (sp->_sig_winch && (sp->_ungetch != 0)) {
+           sp->_ungetch(SP_PARM, KEY_RESIZE);  /* so application can know this */
+       }
        sp->_sig_winch = FALSE;
     }
 }
@@ -666,7 +669,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
            const TERMTYPE *fallback = _nc_fallback(tname);
 
            if (fallback) {
-               termp->type = *fallback;
+               _nc_copy_termtype(&(termp->type), fallback);
                status = TGETENT_YES;
            }
        }