[BACK]Return to tty.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/tty.c between version 1.339 and 1.340

version 1.339, 2020/01/13 08:12:53 version 1.340, 2020/01/13 11:59:21
Line 285 
Line 285 
         return (0);          return (0);
 }  }
   
   static void
   tty_start_timer_callback(__unused int fd, __unused short events, void *data)
   {
           struct tty      *tty = data;
           struct client   *c = tty->client;
   
           log_debug("%s: start timer fired", c->name);
           tty->flags |= (TTY_HAVEDA|TTY_HAVEDSR);
   }
   
 void  void
 tty_start_tty(struct tty *tty)  tty_start_tty(struct tty *tty)
 {  {
         struct client   *c = tty->client;          struct client   *c = tty->client;
         struct termios   tio;          struct termios   tio;
           struct timeval   tv = { .tv_sec = 1 };
   
         if (tty->fd != -1 && tcgetattr(tty->fd, &tty->tio) == 0) {          if (tty->fd != -1 && tcgetattr(tty->fd, &tty->tio) == 0) {
                 setblocking(tty->fd, 0);                  setblocking(tty->fd, 0);
Line 328 
Line 339 
                         tty_puts(tty, "\033[?1004h");                          tty_puts(tty, "\033[?1004h");
                 }                  }
                 tty_puts(tty, "\033[c\033[1337n"); /* DA and DSR */                  tty_puts(tty, "\033[c\033[1337n"); /* DA and DSR */
   
         } else          } else
                 tty->flags |= (TTY_HAVEDA|TTY_HAVEDSR);                  tty->flags |= (TTY_HAVEDA|TTY_HAVEDSR);
   
           evtimer_set(&tty->start_timer, tty_start_timer_callback, tty);
           evtimer_add(&tty->start_timer, &tv);
   
         tty->flags |= TTY_STARTED;          tty->flags |= TTY_STARTED;
         tty_invalidate(tty);          tty_invalidate(tty);
   
Line 350 
Line 365 
         if (!(tty->flags & TTY_STARTED))          if (!(tty->flags & TTY_STARTED))
                 return;                  return;
         tty->flags &= ~TTY_STARTED;          tty->flags &= ~TTY_STARTED;
   
           evtimer_del(&tty->start_timer);
   
         event_del(&tty->timer);          event_del(&tty->timer);
         tty->flags &= ~TTY_BLOCK;          tty->flags &= ~TTY_BLOCK;

Legend:
Removed from v.1.339  
changed lines
  Added in v.1.340