diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-05-16 07:32:46 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-05-16 07:32:46 +0100 |
commit | 740f047a850cb189d67dc17938e86fcd2bdfb1c6 (patch) | |
tree | 9c84bbaf1acf3648ec6c1b3170a42af11da9194b | |
parent | c2167c5ee81022ddf9f02cfe189fcea736026ced (diff) | |
download | rtmux-740f047a850cb189d67dc17938e86fcd2bdfb1c6.tar.gz rtmux-740f047a850cb189d67dc17938e86fcd2bdfb1c6.tar.bz2 rtmux-740f047a850cb189d67dc17938e86fcd2bdfb1c6.zip |
Need to update features after all the sequences come in.
-rw-r--r-- | tty.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -286,6 +286,8 @@ tty_start_timer_callback(__unused int fd, __unused short events, void *data) struct client *c = tty->client; log_debug("%s: start timer fired", c->name); + if ((tty->flags & (TTY_HAVEDA|TTY_HAVEXDA)) == 0) + tty_update_features(tty); tty->flags |= (TTY_HAVEDA|TTY_HAVEXDA); } @@ -329,13 +331,6 @@ tty_start_tty(struct tty *tty) tty_puts(tty, "\033[?1006l\033[?1005l"); } - if (options_get_number(global_options, "focus-events")) - tty_raw(tty, tty_term_string(tty->term, TTYC_ENFCS)); - if (options_get_number(global_options, "extended-keys")) - tty_raw(tty, tty_term_string(tty->term, TTYC_ENEKS)); - if (tty->term->flags & TERM_VT100LIKE) - tty_puts(tty, "\033[?7727h"); - evtimer_set(&tty->start_timer, tty_start_timer_callback, tty); evtimer_add(&tty->start_timer, &tv); @@ -469,6 +464,12 @@ tty_update_features(struct tty *tty) if (tty_use_margin(tty)) tty_putcode(tty, TTYC_ENMG); + if (options_get_number(global_options, "extended-keys")) + tty_puts(tty, tty_term_string(tty->term, TTYC_ENEKS)); + if (options_get_number(global_options, "focus-events")) + tty_raw(tty, tty_term_string(tty->term, TTYC_ENFCS)); + if (tty->term->flags & TERM_VT100LIKE) + tty_puts(tty, "\033[?7727h"); } void |