From 7df9f57628322bdd4a4462ff3f59bd1e3387adee Mon Sep 17 00:00:00 2001
From: Yuri Khan <yurivkhan@gmail.com>
Date: Mon, 9 May 2016 18:04:21 +0600
Subject: [PATCH] Ticket #3639: fix window resizing when panels are hidden (try
2).
This time, do not botch SIGWINCH delivery to the subshell.
---
lib/tty/tty-slang.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c
index 143a6d3..239dae3 100644
a
|
b
|
static struct termios new_mode; |
83 | 83 | /* Controls whether we should wait for input in tty_lowlevel_getch */ |
84 | 84 | static gboolean no_slang_delay; |
85 | 85 | |
| 86 | static gboolean slsmg_active; |
| 87 | |
86 | 88 | /* This table describes which capabilities we want and which values we |
87 | 89 | * assign to them. |
88 | 90 | */ |
… |
… |
tty_init (gboolean mouse_enable, gboolean is_xterm) |
329 | 331 | tty_display_8bit (FALSE); |
330 | 332 | |
331 | 333 | SLsmg_init_smg (); |
| 334 | slsmg_active = TRUE; |
332 | 335 | if (!mouse_enable) |
333 | 336 | use_mouse_p = MOUSE_DISABLED; |
334 | 337 | tty_init_xterm_support (is_xterm); /* do it before tty_enter_ca_mode() call */ |
… |
… |
tty_shutdown (void) |
354 | 357 | tty_reset_screen (); |
355 | 358 | tty_exit_ca_mode (); |
356 | 359 | SLang_reset_tty (); |
| 360 | slsmg_active = FALSE; |
357 | 361 | |
358 | 362 | /* Load the op capability to reset the colors to those that were |
359 | 363 | * active when the program was started up |
… |
… |
void |
388 | 392 | tty_change_screen_size (void) |
389 | 393 | { |
390 | 394 | SLtt_get_screen_size (); |
391 | | SLsmg_reinit_smg (); |
| 395 | if (slsmg_active) |
| 396 | SLsmg_reinit_smg (); |
392 | 397 | |
393 | 398 | #ifdef ENABLE_SUBSHELL |
394 | 399 | if (mc_global.tty.use_subshell) |
… |
… |
tty_reset_prog_mode (void) |
404 | 409 | { |
405 | 410 | tcsetattr (SLang_TT_Read_FD, TCSANOW, &new_mode); |
406 | 411 | SLsmg_init_smg (); |
| 412 | slsmg_active = TRUE; |
407 | 413 | SLsmg_touch_lines (0, LINES); |
408 | 414 | } |
409 | 415 | |
… |
… |
int |
504 | 510 | tty_reset_screen (void) |
505 | 511 | { |
506 | 512 | SLsmg_reset_smg (); |
| 513 | slsmg_active = FALSE; |
507 | 514 | return 0; /* OK */ |
508 | 515 | } |
509 | 516 | |