X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_window.c;h=2261a1f056ecff7334ddd336467c1f2fb755b9d7;hp=bb20f4faf2a2eb2bad27b7f68409f1520bb8b8f9;hb=7a6bbc8cf41c5186d46accc3d08622dc86526b34;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/ncurses/base/lib_window.c b/ncurses/base/lib_window.c index bb20f4fa..2261a1f0 100644 --- a/ncurses/base/lib_window.c +++ b/ncurses/base/lib_window.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 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 * @@ -39,7 +39,7 @@ #include -MODULE_ID("$Id: lib_window.c,v 1.22 2006/05/27 19:21:19 tom Exp $") +MODULE_ID("$Id: lib_window.c,v 1.26 2009/04/18 18:46:09 tom Exp $") NCURSES_EXPORT(void) _nc_synchook(WINDOW *win) @@ -149,7 +149,7 @@ wsyncdown(WINDOW *win) /* left and right character in child coordinates */ int left = pp->_line[win->_pary + y].firstchar - win->_parx; int right = pp->_line[win->_pary + y].lastchar - win->_parx; - /* The change maybe outside the childs range */ + /* The change may be outside the child's range */ if (left < 0) left = 0; if (right > win->_maxx) @@ -185,15 +185,20 @@ dupwin(WINDOW *win) T((T_CALLED("dupwin(%p)"), win)); if (win != 0) { - +#if NCURSES_SP_FUNCS + SCREEN *sp = _nc_screen_of(win); +#endif + _nc_lock_global(curses); if (win->_flags & _ISPAD) { - nwin = newpad(win->_maxy + 1, - win->_maxx + 1); + nwin = NCURSES_SP_NAME(newpad) (NCURSES_SP_ARGx + win->_maxy + 1, + win->_maxx + 1); } else { - nwin = newwin(win->_maxy + 1, - win->_maxx + 1, - win->_begy, - win->_begx); + nwin = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx + win->_maxy + 1, + win->_maxx + 1, + win->_begy, + win->_begx); } if (nwin != 0) { @@ -243,6 +248,7 @@ dupwin(WINDOW *win) nwin->_line[i].lastchar = win->_line[i].lastchar; } } + _nc_unlock_global(curses); } returnWin(nwin); }