- (void) _nc_freewin(CurScreen(sp));
- (void) _nc_freewin(NewScreen(sp));
- (void) _nc_freewin(StdScreen(sp));
+ /* delete all of the windows in this screen */
+ rescan:
+ for (each_window(sp, wl)) {
+ if (_nc_freewin(&(wl->win)) == OK) {
+ goto rescan;
+ }
+ }