[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.333 and 1.334

version 1.333, 2019/11/14 07:56:32 version 1.334, 2019/11/28 09:05:34
Line 127 
Line 127 
 {  {
         struct client   *c = tty->client;          struct client   *c = tty->client;
         struct winsize   ws;          struct winsize   ws;
         u_int            sx, sy;          u_int            sx, sy, xpixel, ypixel;
   
         if (ioctl(tty->fd, TIOCGWINSZ, &ws) != -1) {          if (ioctl(tty->fd, TIOCGWINSZ, &ws) != -1) {
                 sx = ws.ws_col;                  sx = ws.ws_col;
                 if (sx == 0)                  if (sx == 0) {
                         sx = 80;                          sx = 80;
                           xpixel = 0;
                   } else
                           xpixel = ws.ws_xpixel / sx;
                 sy = ws.ws_row;                  sy = ws.ws_row;
                 if (sy == 0)                  if (sy == 0) {
                         sy = 24;                          sy = 24;
                           ypixel = 0;
                   } else
                           ypixel = ws.ws_ypixel / sy;
         } else {          } else {
                 sx = 80;                  sx = 80;
                 sy = 24;                  sy = 24;
                   xpixel = 0;
                   ypixel = 0;
         }          }
         log_debug("%s: %s now %ux%u", __func__, c->name, sx, sy);          log_debug("%s: %s now %ux%u (%ux%u)", __func__, c->name, sx, sy,
         tty_set_size(tty, sx, sy);              xpixel, ypixel);
           tty_set_size(tty, sx, sy, xpixel, ypixel);
         tty_invalidate(tty);          tty_invalidate(tty);
 }  }
   
 void  void
 tty_set_size(struct tty *tty, u_int sx, u_int sy)  tty_set_size(struct tty *tty, u_int sx, u_int sy, u_int xpixel, u_int ypixel)
 {  {
         tty->sx = sx;          tty->sx = sx;
         tty->sy = sy;          tty->sy = sy;
           tty->xpixel = xpixel;
           tty->ypixel = ypixel;
 }  }
   
 static void  static void

Legend:
Removed from v.1.333  
changed lines
  Added in v.1.334