diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-07-05 16:24:13 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-07-05 16:24:13 +0100 |
commit | e496a548d7b07c9a4be9ce8e750cf5423e3bafe3 (patch) | |
tree | 26b867940c5174e44894050a493a70a5118ba968 /tty.c | |
parent | 3d39b18e319cdd96bf25debcfcf52c03120e3d8e (diff) | |
parent | c7a121cfc0137c907b7bfb0c3fd1bdee395af8aa (diff) | |
download | rtmux-e496a548d7b07c9a4be9ce8e750cf5423e3bafe3.tar.gz rtmux-e496a548d7b07c9a4be9ce8e750cf5423e3bafe3.tar.bz2 rtmux-e496a548d7b07c9a4be9ce8e750cf5423e3bafe3.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -219,8 +219,13 @@ tty_start_tty(struct tty *tty) if (tty_term_has(tty->term, TTYC_KMOUS)) tty_puts(tty, "\033[?1000l\033[?1006l\033[?1005l"); - if (tty_term_has(tty->term, TTYC_XT)) + if (tty_term_has(tty->term, TTYC_XT)) { + if (options_get_number(&global_options, "focus-events")) { + tty->flags |= TTY_FOCUS; + tty_puts(tty, "\033[?1004h"); + } tty_puts(tty, "\033[c\033[>4;1m\033[m"); + } tty->cx = UINT_MAX; tty->cy = UINT_MAX; @@ -282,8 +287,13 @@ tty_stop_tty(struct tty *tty) if (tty_term_has(tty->term, TTYC_KMOUS)) tty_raw(tty, "\033[?1000l\033[?1006l\033[?1005l"); - if (tty_term_has(tty->term, TTYC_XT)) + if (tty_term_has(tty->term, TTYC_XT)) { + if (tty->flags & TTY_FOCUS) { + tty->flags &= ~TTY_FOCUS; + tty_puts(tty, "\033[?1004l"); + } tty_raw(tty, "\033[>4m\033[m"); + } tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP)); |