mirror of https://github.com/MidnightCommander/mc
Merge branch '3639_subshell_output_lost_fix'
* 3639_subshell_output_lost_fix: Do not botch SIGWINCH delivery to the subshell. Ticket #3639: fix window resizing when panels are hidden.
This commit is contained in:
commit
57d713085b
|
@ -83,6 +83,8 @@ static struct termios new_mode;
|
|||
/* Controls whether we should wait for input in tty_lowlevel_getch */
|
||||
static gboolean no_slang_delay;
|
||||
|
||||
static gboolean slsmg_active = FALSE;
|
||||
|
||||
/* This table describes which capabilities we want and which values we
|
||||
* assign to them.
|
||||
*/
|
||||
|
@ -329,6 +331,7 @@ tty_init (gboolean mouse_enable, gboolean is_xterm)
|
|||
tty_display_8bit (FALSE);
|
||||
|
||||
SLsmg_init_smg ();
|
||||
slsmg_active = TRUE;
|
||||
if (!mouse_enable)
|
||||
use_mouse_p = MOUSE_DISABLED;
|
||||
tty_init_xterm_support (is_xterm); /* do it before tty_enter_ca_mode() call */
|
||||
|
@ -354,6 +357,7 @@ tty_shutdown (void)
|
|||
tty_reset_screen ();
|
||||
tty_exit_ca_mode ();
|
||||
SLang_reset_tty ();
|
||||
slsmg_active = FALSE;
|
||||
|
||||
/* Load the op capability to reset the colors to those that were
|
||||
* active when the program was started up
|
||||
|
@ -388,7 +392,8 @@ void
|
|||
tty_change_screen_size (void)
|
||||
{
|
||||
SLtt_get_screen_size ();
|
||||
SLsmg_reinit_smg ();
|
||||
if (slsmg_active)
|
||||
SLsmg_reinit_smg ();
|
||||
|
||||
#ifdef ENABLE_SUBSHELL
|
||||
if (mc_global.tty.use_subshell)
|
||||
|
@ -404,6 +409,7 @@ tty_reset_prog_mode (void)
|
|||
{
|
||||
tcsetattr (SLang_TT_Read_FD, TCSANOW, &new_mode);
|
||||
SLsmg_init_smg ();
|
||||
slsmg_active = TRUE;
|
||||
SLsmg_touch_lines (0, LINES);
|
||||
}
|
||||
|
||||
|
@ -504,6 +510,7 @@ int
|
|||
tty_reset_screen (void)
|
||||
{
|
||||
SLsmg_reset_smg ();
|
||||
slsmg_active = FALSE;
|
||||
return 0; /* OK */
|
||||
}
|
||||
|
||||
|
|
|
@ -531,7 +531,7 @@ feed_subshell (int how, gboolean fail_on_error)
|
|||
/* Despite using SA_RESTART, we still have to check for this */
|
||||
if (errno == EINTR)
|
||||
{
|
||||
if (how == QUIETLY && mc_global.tty.winch_flag != 0)
|
||||
if (mc_global.tty.winch_flag != 0)
|
||||
tty_change_screen_size ();
|
||||
|
||||
continue; /* try all over again */
|
||||
|
|
Loading…
Reference in New Issue