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

Diff for /src/usr.bin/tmux/window.c between version 1.173 and 1.174

version 1.173, 2016/10/18 07:38:16 version 1.174, 2016/10/19 09:22:07
Line 60 
Line 60 
 static u_int    next_window_id;  static u_int    next_window_id;
 static u_int    next_active_point;  static u_int    next_active_point;
   
   static void     window_destroy(struct window *);
   
 static struct window_pane *window_pane_create(struct window *, u_int, u_int,  static struct window_pane *window_pane_create(struct window *, u_int, u_int,
                     u_int);                      u_int);
 static void     window_pane_destroy(struct window_pane *);  static void     window_pane_destroy(struct window_pane *);
Line 184 
Line 186 
 void  void
 winlink_set_window(struct winlink *wl, struct window *w)  winlink_set_window(struct winlink *wl, struct window *w)
 {  {
           if (wl->window != NULL) {
                   TAILQ_REMOVE(&wl->window->winlinks, wl, wentry);
                   window_remove_ref(w);
           }
           TAILQ_INSERT_TAIL(&w->winlinks, wl, wentry);
         wl->window = w;          wl->window = w;
         w->references++;          w->references++;
 }  }
Line 193 
Line 200 
 {  {
         struct window   *w = wl->window;          struct window   *w = wl->window;
   
           if (w != NULL) {
                   TAILQ_REMOVE(&w->winlinks, wl, wentry);
                   window_remove_ref(w);
           }
   
         RB_REMOVE(winlinks, wwl, wl);          RB_REMOVE(winlinks, wwl, wl);
         free(wl->status_text);          free(wl->status_text);
         free(wl);          free(wl);
   
         if (w != NULL)  
                 window_remove_ref(w);  
 }  }
   
 struct winlink *  struct winlink *
Line 313 
Line 322 
         w->options = options_create(global_w_options);          w->options = options_create(global_w_options);
   
         w->references = 0;          w->references = 0;
           TAILQ_INIT(&w->winlinks);
   
         w->id = next_window_id++;          w->id = next_window_id++;
         RB_INSERT(windows, &windows, w);          RB_INSERT(windows, &windows, w);
Line 350 
Line 360 
         return (w);          return (w);
 }  }
   
 void  static void
 window_destroy(struct window *w)  window_destroy(struct window *w)
 {  {
           if (!TAILQ_EMPTY(&w->winlinks))
                   fatalx("window destroyed with winlinks");
   
         RB_REMOVE(windows, &windows, w);          RB_REMOVE(windows, &windows, w);
   
         if (w->layout_root != NULL)          if (w->layout_root != NULL)
Line 1421 
Line 1434 
 void  void
 winlink_clear_flags(struct winlink *wl)  winlink_clear_flags(struct winlink *wl)
 {  {
         struct session  *s;          struct winlink  *loop;
         struct winlink  *wl_loop;  
   
         RB_FOREACH(s, sessions, &sessions) {          wl->window->flags &= ~WINDOW_ALERTFLAGS;
                 RB_FOREACH(wl_loop, winlinks, &s->windows) {          TAILQ_FOREACH(loop, &wl->window->winlinks, wentry) {
                         if (wl_loop->window != wl->window)                  if ((loop->flags & WINLINK_ALERTFLAGS) != 0) {
                                 continue;                          loop->flags &= ~WINLINK_ALERTFLAGS;
                         if ((wl_loop->flags & WINLINK_ALERTFLAGS) == 0)                          server_status_session(loop->session);
                                 continue;  
   
                         wl_loop->flags &= ~WINLINK_ALERTFLAGS;  
                         wl_loop->window->flags &= ~WINDOW_ALERTFLAGS;  
                         server_status_session(s);  
                 }                  }
         }          }
 }  }

Legend:
Removed from v.1.173  
changed lines
  Added in v.1.174