- /*
- * If we have a pending SIGWINCH, set the flag in each screen.
- * But do this only if the block is enabled.
- */
- if (can_resizeall-- >= 0) { /* test and disable */
- if (have_sigwinch) {
- scan = _nc_screen_chain;
- while (scan) {
- scan->_sig_winch = TRUE;
- scan = scan->_next_screen;
- }
- have_sigwinch = 0;
+ if (_nc_globals.have_sigwinch) {
+ _nc_globals.have_sigwinch = 0;
+
+ for (each_screen(scan)) {
+ scan->_sig_winch = TRUE;