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

Diff for /src/usr.bin/tmux/Attic/server-window.c between version 1.33 and 1.34

version 1.33, 2015/04/22 15:30:11 version 1.34, 2015/04/24 23:17:11
Line 58 
Line 58 
 {  {
         struct client   *c;          struct client   *c;
         struct window   *w = wl->window;          struct window   *w = wl->window;
         u_int            i;  
         int              action, visual;          int              action, visual;
   
         if (!(w->flags & WINDOW_BELL) || wl->flags & WINLINK_BELL)          if (!(w->flags & WINDOW_BELL) || wl->flags & WINLINK_BELL)
Line 74 
Line 73 
         action = options_get_number(&s->options, "bell-action");          action = options_get_number(&s->options, "bell-action");
         if (action == BELL_NONE)          if (action == BELL_NONE)
                 return (0);                  return (0);
         for (i = 0; i < ARRAY_LENGTH(&clients); i++) {          TAILQ_FOREACH(c, &clients, entry) {
                 c = ARRAY_ITEM(&clients, i);                  if (c->session != s || c->flags & CLIENT_CONTROL)
                 if (c == NULL || c->session != s || c->flags & CLIENT_CONTROL)  
                         continue;                          continue;
                 if (!visual) {                  if (!visual) {
                         if (c->session->curw->window == w || action == BELL_ANY)                          if (c->session->curw->window == w || action == BELL_ANY)
Line 98 
Line 96 
 {  {
         struct client   *c;          struct client   *c;
         struct window   *w = wl->window;          struct window   *w = wl->window;
         u_int            i;  
   
         if (s->curw->window == w)          if (s->curw->window == w)
                 w->flags &= ~WINDOW_ACTIVITY;                  w->flags &= ~WINDOW_ACTIVITY;
Line 116 
Line 113 
         wl->flags |= WINLINK_ACTIVITY;          wl->flags |= WINLINK_ACTIVITY;
   
         if (options_get_number(&s->options, "visual-activity")) {          if (options_get_number(&s->options, "visual-activity")) {
                 for (i = 0; i < ARRAY_LENGTH(&clients); i++) {                  TAILQ_FOREACH(c, &clients, entry) {
                         c = ARRAY_ITEM(&clients, i);                          if (c->session != s)
                         if (c == NULL || c->session != s)  
                                 continue;                                  continue;
                         status_message_set(c, "Activity in window %d", wl->idx);                          status_message_set(c, "Activity in window %d", wl->idx);
                 }                  }
Line 134 
Line 130 
         struct client   *c;          struct client   *c;
         struct window   *w = wl->window;          struct window   *w = wl->window;
         struct timeval   timer;          struct timeval   timer;
         u_int            i;  
         int              silence_interval, timer_difference;          int              silence_interval, timer_difference;
   
         if (!(w->flags & WINDOW_SILENCE) || wl->flags & WINLINK_SILENCE)          if (!(w->flags & WINDOW_SILENCE) || wl->flags & WINLINK_SILENCE)
Line 167 
Line 162 
         wl->flags |= WINLINK_SILENCE;          wl->flags |= WINLINK_SILENCE;
   
         if (options_get_number(&s->options, "visual-silence")) {          if (options_get_number(&s->options, "visual-silence")) {
                 for (i = 0; i < ARRAY_LENGTH(&clients); i++) {                  TAILQ_FOREACH(c, &clients, entry) {
                         c = ARRAY_ITEM(&clients, i);                          if (c->session != s)
                         if (c == NULL || c->session != s)  
                                 continue;                                  continue;
                         status_message_set(c, "Silence in window %d", wl->idx);                          status_message_set(c, "Silence in window %d", wl->idx);
                 }                  }
Line 183 
Line 177 
 ring_bell(struct session *s)  ring_bell(struct session *s)
 {  {
         struct client   *c;          struct client   *c;
         u_int            i;  
   
         for (i = 0; i < ARRAY_LENGTH(&clients); i++) {          TAILQ_FOREACH(c, &clients, entry) {
                 c = ARRAY_ITEM(&clients, i);                  if (c->session == s && !(c->flags & CLIENT_CONTROL))
                 if (c != NULL && c->session == s && !(c->flags & CLIENT_CONTROL))  
                         tty_bell(&c->tty);                          tty_bell(&c->tty);
         }          }
 }  }

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34