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

Diff for /src/usr.bin/tmux/notify.c between version 1.9 and 1.10

version 1.9, 2016/10/10 21:29:23 version 1.10, 2016/10/15 00:01:01
Line 45 
Line 45 
 };  };
 TAILQ_HEAD(notify_queue, notify_entry);  TAILQ_HEAD(notify_queue, notify_entry);
 static struct notify_queue notify_queue = TAILQ_HEAD_INITIALIZER(notify_queue);  static struct notify_queue notify_queue = TAILQ_HEAD_INITIALIZER(notify_queue);
 static int      notify_enabled = 1;  
   
 static void     notify_drain(void);  
 static void     notify_add(enum notify_type, struct client *, struct session *,  static void     notify_add(enum notify_type, struct client *, struct session *,
                     struct window *);                      struct window *);
   
 void  
 notify_enable(void)  
 {  
         notify_enabled = 1;  
         notify_drain();  
 }  
   
 void  
 notify_disable(void)  
 {  
         notify_enabled = 0;  
 }  
   
 static void  static void
 notify_add(enum notify_type type, struct client *c, struct session *s,  notify_add(enum notify_type type, struct client *c, struct session *s,
     struct window *w)      struct window *w)
Line 85 
Line 70 
                 w->references++;                  w->references++;
 }  }
   
 static void  void
 notify_drain(void)  notify_drain(void)
 {  {
         struct notify_entry     *ne, *ne1;          struct notify_entry     *ne, *ne1;
   
         if (!notify_enabled)  
                 return;  
   
         TAILQ_FOREACH_SAFE(ne, &notify_queue, entry, ne1) {          TAILQ_FOREACH_SAFE(ne, &notify_queue, entry, ne1) {
                 switch (ne->type) {                  switch (ne->type) {
                 case NOTIFY_WINDOW_LAYOUT_CHANGED:                  case NOTIFY_WINDOW_LAYOUT_CHANGED:
Line 137 
Line 119 
 notify_input(struct window_pane *wp, struct evbuffer *input)  notify_input(struct window_pane *wp, struct evbuffer *input)
 {  {
         struct client   *c;          struct client   *c;
   
         /*  
          * notify_input() is not queued and only does anything when  
          * notifications are enabled.  
          */  
         if (!notify_enabled)  
                 return;  
   
         TAILQ_FOREACH(c, &clients, entry) {          TAILQ_FOREACH(c, &clients, entry) {
                 if (c->flags & CLIENT_CONTROL)                  if (c->flags & CLIENT_CONTROL)

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