diff options
author | Thomas Adam <thomas@xteddy.org> | 2023-01-06 09:02:00 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2023-01-06 09:02:00 +0000 |
commit | 21e00e46359478f95c15f1672e5796e86eb0f529 (patch) | |
tree | 12e23d6fe45d82cdd73373d3b3566bada6fce4f2 /tty.c | |
parent | 70ff8cfe1e06987501a55a32df31d1f69acd2f99 (diff) | |
parent | 09afc6c8ee971918d925c441c41a9de7f598efb7 (diff) | |
download | rtmux-21e00e46359478f95c15f1672e5796e86eb0f529.tar.gz rtmux-21e00e46359478f95c15f1672e5796e86eb0f529.tar.bz2 rtmux-21e00e46359478f95c15f1672e5796e86eb0f529.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -108,6 +108,7 @@ tty_init(struct tty *tty, struct client *c) tty->cstyle = SCREEN_CURSOR_DEFAULT; tty->ccolour = -1; + tty->fg = tty->bg = -1; if (tcgetattr(c->fd, &tty->tio) != 0) return (-1); @@ -286,7 +287,6 @@ tty_open(struct tty *tty, char **cause) evtimer_set(&tty->timer, tty_timer_callback, tty); tty_start_tty(tty); - tty_keys_build(tty); return (0); @@ -301,7 +301,7 @@ tty_start_timer_callback(__unused int fd, __unused short events, void *data) log_debug("%s: start timer fired", c->name); if ((tty->flags & (TTY_HAVEDA|TTY_HAVEDA2|TTY_HAVEXDA)) == 0) tty_update_features(tty); - tty->flags |= (TTY_HAVEDA|TTY_HAVEDA2|TTY_HAVEXDA); + tty->flags |= TTY_ALL_REQUEST_FLAGS; } void @@ -369,8 +369,12 @@ tty_send_requests(struct tty *tty) tty_puts(tty, "\033[>c"); if (~tty->flags & TTY_HAVEXDA) tty_puts(tty, "\033[>q"); + if (~tty->flags & TTY_HAVEFG) + tty_puts(tty, "\033]10;?\033\\"); + if (~tty->flags & TTY_HAVEBG) + tty_puts(tty, "\033]11;?\033\\"); } else - tty->flags |= (TTY_HAVEDA|TTY_HAVEDA2|TTY_HAVEXDA); + tty->flags |= TTY_ALL_REQUEST_FLAGS; } void |