[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.8 and 1.9

version 1.8, 2013/03/26 10:54:48 version 1.9, 2014/04/23 10:14:29
Line 99 
Line 99 
 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;
           struct session  *cs;
         u_int            i;          u_int            i;
   
         for (i = 0; i < ARRAY_LENGTH(&clients); i++) {          for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                 c = ARRAY_ITEM(&clients, i);                  c = ARRAY_ITEM(&clients, i);
                 if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)                  if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
                         continue;                          continue;
                   cs = c->session;
   
                 control_write(c, "%%window-close @%u", w->id);                  if (winlink_find_by_window_id(&cs->windows, w->id) != NULL)
                           control_write(c, "%%window-close @%u", w->id);
                   else
                           control_write(c, "%%unlinked-window-close @%u", w->id);
         }          }
 }  }
   
Line 134 
Line 139 
 control_notify_window_renamed(struct window *w)  control_notify_window_renamed(struct window *w)
 {  {
         struct client   *c;          struct client   *c;
           struct session  *cs;
         u_int            i;          u_int            i;
   
         for (i = 0; i < ARRAY_LENGTH(&clients); i++) {          for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                 c = ARRAY_ITEM(&clients, i);                  c = ARRAY_ITEM(&clients, i);
                 if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)                  if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
                         continue;                          continue;
                   cs = c->session;
   
                 control_write(c, "%%window-renamed @%u %s", w->id, w->name);                  if (winlink_find_by_window_id(&cs->windows, w->id) != NULL) {
                           control_write(c, "%%window-renamed @%u %s", w->id,
                               w->name);
                   } else {
                           control_write(c, "%%unlinked-window-renamed @%u %s",
                               w->id, w->name);
                   }
         }          }
 }  }
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9