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

Diff for /src/usr.bin/tmux/server-client.c between version 1.372 and 1.373

version 1.372, 2021/04/12 09:36:12 version 1.373, 2021/06/10 07:21:46
Line 46 
Line 46 
 static void     server_client_set_title(struct client *);  static void     server_client_set_title(struct client *);
 static void     server_client_reset_state(struct client *);  static void     server_client_reset_state(struct client *);
 static int      server_client_assume_paste(struct session *);  static int      server_client_assume_paste(struct session *);
   static void     server_client_update_latest(struct client *);
   
 static void     server_client_dispatch(struct imsg *, void *);  static void     server_client_dispatch(struct imsg *, void *);
 static void     server_client_dispatch_command(struct client *, struct imsg *);  static void     server_client_dispatch_command(struct client *, struct imsg *);
Line 274 
Line 275 
         return (0);          return (0);
 }  }
   
   /* Lost an attached client. */
   static void
   server_client_attached_lost(struct client *c)
   {
           struct session  *s = c->session;
           struct window   *w;
           struct client   *loop;
           struct client   *found;
   
           log_debug("lost attached client %p", c);
   
           /*
            * By this point the session in the client has been cleared so walk all
            * windows to find any with this client as the latest.
            */
           RB_FOREACH(w, windows, &windows) {
                   if (w->latest != c)
                           continue;
   
                   found = NULL;
                   TAILQ_FOREACH(loop, &clients, entry) {
                           s = loop->session;
                           if (loop == c || s == NULL || s->curw->window != w)
                                   continue;
                           if (found == NULL ||
                               timercmp(&loop->activity_time, &found->activity_time,
                               >))
                                   found = loop;
                   }
                   if (found != NULL)
                           server_client_update_latest(found);
           }
   }
   
 /* Lost a client. */  /* Lost a client. */
 void  void
 server_client_lost(struct client *c)  server_client_lost(struct client *c)
Line 299 
Line 334 
         TAILQ_REMOVE(&clients, c, entry);          TAILQ_REMOVE(&clients, c, entry);
         log_debug("lost client %p", c);          log_debug("lost client %p", c);
   
         if (c->flags & CLIENT_ATTACHED)          if (c->flags & CLIENT_ATTACHED) {
                   server_client_attached_lost(c);
                 notify_client("client-detached", c);                  notify_client("client-detached", c);
           }
   
         if (c->flags & CLIENT_CONTROL)          if (c->flags & CLIENT_CONTROL)
                 control_stop(c);                  control_stop(c);

Legend:
Removed from v.1.372  
changed lines
  Added in v.1.373