X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Fwresize.c;h=49e0d58af54c6bd610999e3a46c7a22f5802f172;hp=ae62806e02fc355598827f6a0e8979692721e165;hb=404cc3f5b0751dd219565139f825c5a4d445f651;hpb=e6c7286022d8a7a7ea7f15a6ffa7f9addb00e42d;ds=sidebyside diff --git a/ncurses/base/wresize.c b/ncurses/base/wresize.c index ae62806e..49e0d58a 100644 --- a/ncurses/base/wresize.c +++ b/ncurses/base/wresize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 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 * @@ -32,7 +32,7 @@ #include -MODULE_ID("$Id: wresize.c,v 1.26 2007/09/29 20:37:13 tom Exp $") +MODULE_ID("$Id: wresize.c,v 1.30 2009/05/09 18:37:43 tom Exp $") static int cleanup_lines(struct ldat *data, int length) @@ -54,7 +54,9 @@ repair_subwindows(WINDOW *cmp) struct ldat *pline = cmp->_line; int row; - for (wp = _nc_windows; wp != 0; wp = wp->next) { + _nc_lock_global(curses); + + for (each_window(SP, wp)) { WINDOW *tst = &(wp->win); if (tst->_parent == cmp) { @@ -75,6 +77,7 @@ repair_subwindows(WINDOW *cmp) repair_subwindows(tst); } } + _nc_unlock_global(curses); } /*