X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_window.c;h=ac61cb01da99a8af23f142938fbcd202c57f0d60;hp=25101673044e90235ae81d823af12ab0ba6c1a5b;hb=396a05943b7da5039dd15d79c4385c7d2a75d6d4;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/ncurses/base/lib_window.c b/ncurses/base/lib_window.c index 25101673..ac61cb01 100644 --- a/ncurses/base/lib_window.c +++ b/ncurses/base/lib_window.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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.21 2002/09/14 23:28:02 tom Exp $") +MODULE_ID("$Id: lib_window.c,v 1.24 2008/04/12 22:40:21 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) @@ -186,6 +186,7 @@ dupwin(WINDOW *win) if (win != 0) { + _nc_lock_window(win); if (win->_flags & _ISPAD) { nwin = newpad(win->_maxy + 1, win->_maxx + 1); @@ -211,7 +212,7 @@ dupwin(WINDOW *win) * The text is really copied into the clone. */ - nwin->_attrs = win->_attrs; + WINDOW_ATTRS(nwin) = WINDOW_ATTRS(win); nwin->_nc_bkgd = win->_nc_bkgd; nwin->_notimeout = win->_notimeout; @@ -243,6 +244,7 @@ dupwin(WINDOW *win) nwin->_line[i].lastchar = win->_line[i].lastchar; } } + _nc_unlock_window(win); } returnWin(nwin); }