[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.11 and 1.12

version 1.11, 2015/04/24 23:17:11 version 1.12, 2015/11/13 10:00:26
Line 19 
Line 19 
   
 #include <sys/types.h>  #include <sys/types.h>
   
   #include <stdlib.h>
   
 #include "tmux.h"  #include "tmux.h"
   
 #define CONTROL_SHOULD_NOTIFY_CLIENT(c) \  #define CONTROL_SHOULD_NOTIFY_CLIENT(c) \
Line 65 
Line 67 
         struct format_tree      *ft;          struct format_tree      *ft;
         struct winlink          *wl;          struct winlink          *wl;
         const char              *template;          const char              *template;
           char                    *expanded;
   
           template = "%layout-change #{window_id} #{window_layout} "
               "#{window_visible_layout} #{window_flags}";
   
         TAILQ_FOREACH(c, &clients, entry) {          TAILQ_FOREACH(c, &clients, entry) {
                 if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)                  if (!CONTROL_SHOULD_NOTIFY_CLIENT(c) || c->session == NULL)
                         continue;                          continue;
Line 81 
Line 87 
                  */                   */
                 if (w->layout_root == NULL)                  if (w->layout_root == NULL)
                         continue;                          continue;
                 template = "%layout-change #{window_id} #{window_layout}";  
   
                 ft = format_create();                  ft = format_create();
                 wl = winlink_find_by_window(&s->windows, w);                  wl = winlink_find_by_window(&s->windows, w);
                 if (wl != NULL) {                  if (wl != NULL) {
                         format_defaults(ft, c, NULL, wl, NULL);                          format_defaults(ft, c, NULL, wl, NULL);
                         control_write(c, "%s", format_expand(ft, template));                          expanded = format_expand(ft, template);
                           control_write(c, "%s", expanded);
                           free(expanded);
                 }                  }
                 format_free(ft);                  format_free(ft);
         }          }

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12