Ticket #3639: 0001-Ticket-3639-fix-window-resizing-when-panels-are-hidd.patch

File 0001-Ticket-3639-fix-window-resizing-when-panels-are-hidd.patch, 1.9 KB (added by yurikhan, 8 years ago)

A less invasive attempt

  • lib/tty/tty-slang.c

    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; 
    8383/* Controls whether we should wait for input in tty_lowlevel_getch */ 
    8484static gboolean no_slang_delay; 
    8585 
     86static gboolean slsmg_active; 
     87 
    8688/* This table describes which capabilities we want and which values we 
    8789 * assign to them. 
    8890 */ 
    tty_init (gboolean mouse_enable, gboolean is_xterm) 
    329331    tty_display_8bit (FALSE); 
    330332 
    331333    SLsmg_init_smg (); 
     334    slsmg_active = TRUE; 
    332335    if (!mouse_enable) 
    333336        use_mouse_p = MOUSE_DISABLED; 
    334337    tty_init_xterm_support (is_xterm);  /* do it before tty_enter_ca_mode() call */ 
    tty_shutdown (void) 
    354357    tty_reset_screen (); 
    355358    tty_exit_ca_mode (); 
    356359    SLang_reset_tty (); 
     360    slsmg_active = FALSE; 
    357361 
    358362    /* Load the op capability to reset the colors to those that were  
    359363     * active when the program was started up  
    void 
    388392tty_change_screen_size (void) 
    389393{ 
    390394    SLtt_get_screen_size (); 
    391     SLsmg_reinit_smg (); 
     395    if (slsmg_active) 
     396        SLsmg_reinit_smg (); 
    392397 
    393398#ifdef ENABLE_SUBSHELL 
    394399    if (mc_global.tty.use_subshell) 
    tty_reset_prog_mode (void) 
    404409{ 
    405410    tcsetattr (SLang_TT_Read_FD, TCSANOW, &new_mode); 
    406411    SLsmg_init_smg (); 
     412    slsmg_active = TRUE; 
    407413    SLsmg_touch_lines (0, LINES); 
    408414} 
    409415 
    int 
    504510tty_reset_screen (void) 
    505511{ 
    506512    SLsmg_reset_smg (); 
     513    slsmg_active = FALSE; 
    507514    return 0;                   /* OK */ 
    508515} 
    509516