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

Diff for /src/usr.bin/tmux/control-notify.c between version 1.20 and 1.21

version 1.20, 2017/03/08 13:36:12 version 1.21, 2017/05/04 07:16:43
Line 60 
Line 60 
 }  }
   
 void  void
   control_notify_pane_mode_changed(int pane)
   {
           struct client   *c;
   
           TAILQ_FOREACH(c, &clients, entry) {
                   if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
                           continue;
   
                   control_write(c, "%%pane-mode-changed %%%u", pane);
           }
   }
   
   void
 control_notify_window_layout_changed(struct window *w)  control_notify_window_layout_changed(struct window *w)
 {  {
         struct client           *c;          struct client   *c;
         struct session          *s;          struct session  *s;
         struct winlink          *wl;          struct winlink  *wl;
         const char              *template;          const char      *template;
         char                    *cp;          char            *cp;
   
         template = "%layout-change #{window_id} #{window_layout} "          template = "%layout-change #{window_id} #{window_layout} "
             "#{window_visible_layout} #{window_flags}";              "#{window_visible_layout} #{window_flags}";
Line 97 
Line 110 
 }  }
   
 void  void
   control_notify_window_pane_changed(struct window *w)
   {
           struct client   *c;
   
           TAILQ_FOREACH(c, &clients, entry) {
                   if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
                           continue;
   
                   control_write(c, "%%window-pane-changed @%u %%%u", w->id,
                       w->active->id);
           }
   }
   
   void
 control_notify_window_unlinked(__unused struct session *s, struct window *w)  control_notify_window_unlinked(__unused struct session *s, struct window *w)
 {  {
         struct client   *c;          struct client   *c;
Line 154 
Line 181 
 }  }
   
 void  void
 control_notify_client_session_changed(struct client *c)  control_notify_client_session_changed(struct client *cc)
 {  {
           struct client   *c;
         struct session  *s;          struct session  *s;
   
         if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)          if (cc->session == NULL)
                 return;                  return;
         s = c->session;          s = cc->session;
   
         control_write(c, "%%session-changed $%u %s", s->id, s->name);          TAILQ_FOREACH(c, &clients, entry) {
                   if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
                           continue;
   
                   if (cc == c) {
                           control_write(c, "%%session-changed $%u %s", s->id,
                               s->name);
                   } else {
                           control_write(c, "%%client-session-changed %s $%u %s",
                               cc->name, s->id, s->name);
                   }
           }
 }  }
   
 void  void
Line 201 
Line 240 
                         continue;                          continue;
   
                 control_write(c, "%%sessions-changed");                  control_write(c, "%%sessions-changed");
           }
   }
   
   void
   control_notify_session_window_changed(struct session *s)
   {
           struct client   *c;
   
           TAILQ_FOREACH(c, &clients, entry) {
                   if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
                           continue;
   
                   control_write(c, "%%session-window-changed $%u @%u", s->id,
                       s->curw->window->id);
         }          }
 }  }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21