]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/wresize.c
ncurses 5.7 - patch 20090419
[ncurses.git] / ncurses / base / wresize.c
index ae62806e02fc355598827f6a0e8979692721e165..f46085af59fa6ae8e7f02c60d3885e3e8ad61185 100644 (file)
@@ -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 <curses.priv.h>
 
-MODULE_ID("$Id: wresize.c,v 1.26 2007/09/29 20:37:13 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.29 2008/06/07 13:59:01 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(wp)) {
        WINDOW *tst = &(wp->win);
 
        if (tst->_parent == cmp) {
@@ -75,6 +77,7 @@ repair_subwindows(WINDOW *cmp)
            repair_subwindows(tst);
        }
     }
+    _nc_unlock_global(curses);
 }
 
 /*