aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-04-09 14:01:32 +0100
committerThomas Adam <thomas@xteddy.org>2020-04-09 14:01:32 +0100
commit916c3787d7464f66287f83814d563ff36ff3a96a (patch)
tree047ff41d293345680f895005dad3a630cfdf1413 /tty.c
parent9e0e860031fa4a08593cab17ea4796393b5cb149 (diff)
parent0e8710f507acda408e3daf1ad71b33997e126505 (diff)
downloadrtmux-916c3787d7464f66287f83814d563ff36ff3a96a.tar.gz
rtmux-916c3787d7464f66287f83814d563ff36ff3a96a.tar.bz2
rtmux-916c3787d7464f66287f83814d563ff36ff3a96a.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/tty.c b/tty.c
index 46ab1283..a7607cba 100644
--- a/tty.c
+++ b/tty.c
@@ -340,12 +340,7 @@ tty_start_tty(struct tty *tty)
tty->flags |= TTY_FOCUS;
tty_puts(tty, "\033[?1004h");
}
- if (~tty->flags & TTY_HAVEDA)
- tty_puts(tty, "\033[c");
- if (~tty->flags & TTY_HAVEDSR)
- tty_puts(tty, "\033[1337n");
- } else
- tty->flags |= (TTY_HAVEDA|TTY_HAVEDSR);
+ }
evtimer_set(&tty->start_timer, tty_start_timer_callback, tty);
evtimer_add(&tty->start_timer, &tv);
@@ -362,6 +357,21 @@ tty_start_tty(struct tty *tty)
}
void
+tty_send_requests(struct tty *tty)
+{
+ if (~tty->flags & TTY_STARTED)
+ return;
+
+ if (tty_term_flag(tty->term, TTYC_XT)) {
+ if (~tty->flags & TTY_HAVEDA)
+ tty_puts(tty, "\033[c");
+ if (~tty->flags & TTY_HAVEDSR)
+ tty_puts(tty, "\033[1337n");
+ } else
+ tty->flags |= (TTY_HAVEDA|TTY_HAVEDSR);
+}
+
+void
tty_stop_tty(struct tty *tty)
{
struct winsize ws;