/****************************************************************************
* Author: Thomas E. Dickey *
+ * and: Juergen Pfeifer *
****************************************************************************/
/*
*/
#include <curses.priv.h>
-#include <term.h>
#ifndef CUR
-#define CUR SP_TERMTYPE
+#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: resizeterm.c,v 1.39 2009/05/10 00:48:29 tom Exp $")
-
-#define stolen_lines (screen_lines - SP->_lines_avail)
+MODULE_ID("$Id: resizeterm.c,v 1.40 2009/07/04 18:38:49 tom Exp $")
/*
* If we're trying to be reentrant, do not want any local statics.
ripoff_t *rop;
if (win != 0) {
-#if NCURSES_SP_FUNCS
+#ifdef USE_SP_RIPOFF
SCREEN *sp = _nc_screen_of(win);
#endif
for (each_ripoff(rop)) {
ripoff_t *rop;
if (win != 0) {
-#if NCURSES_SP_FUNCS
+#ifdef USE_SP_RIPOFF
SCREEN *sp = _nc_screen_of(win);
#endif
for (each_ripoff(rop)) {
int depth = 0;
if (cmp != 0) {
-#if NCURSES_SP_FUNCS
+#ifdef USE_SP_WINDOWLIST
SCREEN *sp = _nc_screen_of(cmp);
#endif
WINDOWLIST *wp;
* move it to the same relative position.
*/
win->_begy = ToLines - ripped_bottom(win) - 0 - win->_yoffset;
+ if (rop->hook == _nc_slk_initialize)
+ _nc_format_slks(
+#if NCURSES_SP_FUNCS
+ _nc_screen_of(win),
+#endif
+ ToCols);
} else if (win->_begy >= bottom) {
/*
* If it is below the bottom of the new screen, move up by the same
decrease_size(NCURSES_SP_ARGx ToLines, ToCols, was_stolen EXTRA_ARGS);
}
- screen_lines(SP_PARM) = lines = ToLines;
- screen_columns(SP_PARM) = columns = ToCols;
+ screen_lines(SP_PARM) = ToLines;
+ screen_columns(SP_PARM) = ToCols;
+
+#ifdef USE_TERM_DRIVER
+ CallDriver_2(SP_PARM, setsize, ToLines, ToCols);
+#else
+ lines = ToLines;
+ columns = ToCols;
+#endif
- SP_PARM->_lines_avail = lines - was_stolen;
+ SP_PARM->_lines_avail = ToLines - was_stolen;
if (SP_PARM->oldhash) {
FreeAndNull(SP_PARM->oldhash);