Warning: Can't synchronize with repository "(default)" (GIT backend not available). Look in the Trac log for more information.

Ticket #2536 (closed defect: fixed)

Opened 13 years ago

Last modified 13 years ago

Once used the function, only if the TIOCGWINSZ

Reported by: pavlinux Owned by: andrew_b
Priority: trivial Milestone: 4.8.0-pre1
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description

dlg_resize_cb() only used in dialog_change_screen_size()
but if defined TIOCGWINSZ.

dialog-switch.c, line 314

void
dialog_change_screen_size (void)
{
    mc_global.tty.winch_flag = FALSE;
#if defined(HAVE_SLANG) || NCURSES_VERSION_MAJOR >= 4
#if defined TIOCGWINSZ

#ifndef NCURSES_VERSION
    tty_noraw_mode ();
    tty_reset_screen ();
#endif
    tty_low_level_change_screen_size ();
#ifdef HAVE_SLANG
    /* XSI Curses spec states that portable applications shall not invoke
     * initscr() more than once.  This kludge could be done within the scope
     * of the specification by using endwin followed by a refresh (in fact,
     * more than one curses implementation does this); it is guaranteed to work
     * only with slang.
     */
    SLsmg_init_smg ();
    do_enter_ca_mode ();
    tty_keypad (TRUE);
    tty_nodelay (FALSE);
#endif

    /* Inform all suspending dialogs */
    dialog_switch_got_winch ();
    /* Inform all running dialogs */
    g_list_foreach (top_dlg, (GFunc) dlg_resize_cb, NULL);

    /* Now, force the redraw */
    repaint_screen ();

#endif /* TIOCGWINSZ */
#endif /* defined(HAVE_SLANG) || NCURSES_VERSION_MAJOR >= 4 */
}

Attachments

dlg_resize_cb.patch (1.0 KB) - added by pavlinux 13 years ago.

Change History

Changed 13 years ago by pavlinux

comment:1 Changed 13 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Type changed from enhancement to defect
  • Milestone set to 4.8.0-pre1

comment:2 Changed 13 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset set to committed-master
  • Resolution set to fixed
  • severity changed from no branch to merged

comment:3 Changed 13 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.