[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.427 and 1.428

version 1.427, 2023/01/12 18:49:11 version 1.428, 2023/03/27 08:31:32
Line 34 
Line 34 
   
 static int      tty_log_fd = -1;  static int      tty_log_fd = -1;
   
 static int      tty_client_ready(struct client *);  
   
 static void     tty_set_italics(struct tty *);  static void     tty_set_italics(struct tty *);
 static int      tty_try_colour(struct tty *, int, const char *);  static int      tty_try_colour(struct tty *, int, const char *);
 static void     tty_force_cursor_colour(struct tty *, int);  static void     tty_force_cursor_colour(struct tty *, int);
Line 1607 
Line 1605 
 }  }
   
 static int  static int
 tty_client_ready(struct client *c)  tty_client_ready(const struct tty_ctx *ctx, struct client *c)
 {  {
         if (c->session == NULL || c->tty.term == NULL)          if (c->session == NULL || c->tty.term == NULL)
                 return (0);                  return (0);
         if (c->flags & (CLIENT_REDRAWWINDOW|CLIENT_SUSPENDED))          if (c->flags & CLIENT_SUSPENDED)
                 return (0);                  return (0);
   
           /*
            * If invisible panes are allowed (used for passthrough), don't care if
            * redrawing or frozen.
            */
           if (ctx->allow_invisible_panes)
                   return (1);
   
           if (c->flags & CLIENT_REDRAWWINDOW)
                   return (0);
         if (c->tty.flags & TTY_FREEZE)          if (c->tty.flags & TTY_FREEZE)
                 return (0);                  return (0);
         return (1);          return (1);
Line 1628 
Line 1636 
         if (ctx->set_client_cb == NULL)          if (ctx->set_client_cb == NULL)
                 return;                  return;
         TAILQ_FOREACH(c, &clients, entry) {          TAILQ_FOREACH(c, &clients, entry) {
                 if (ctx->allow_invisible_panes) {                  if (tty_client_ready(ctx, c)) {
                     if (c->session == NULL ||  
                         c->tty.term == NULL ||  
                         c->flags & CLIENT_SUSPENDED)  
                             continue;  
                 } else {  
                         if (!tty_client_ready(c))  
                                 continue;  
                         state = ctx->set_client_cb(ctx, c);                          state = ctx->set_client_cb(ctx, c);
                         if (state == -1)                          if (state == -1)
                                 break;                                  break;
                         if (state == 0)                          if (state == 0)
                                 continue;                                  continue;
                           cmdfn(&c->tty, ctx);
                 }                  }
                 cmdfn(&c->tty, ctx);  
         }          }
 }  }
   

Legend:
Removed from v.1.427  
changed lines
  Added in v.1.428