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

Diff for /src/usr.bin/tmux/server-client.c between version 1.1 and 1.2

version 1.1, 2009/10/22 19:41:51 version 1.2, 2009/10/22 20:04:21
Line 175 
Line 175 
   
                 if (buffer_poll(fd, events, c->tty.in, c->tty.out) != 0)                  if (buffer_poll(fd, events, c->tty.in, c->tty.out) != 0)
                         goto client_lost;                          goto client_lost;
                 server_client_handle_data(c);  
         }          }
   
         return;          return;
Line 184 
Line 183 
         server_client_lost(c);          server_client_lost(c);
 }  }
   
 /* Input data from client. */  /* Client functions that need to happen every loop. */
 void  void
   server_client_loop(void)
   {
           struct client           *c;
           struct window           *w;
           struct window_pane      *wp;
           u_int                    i;
   
           for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                   c = ARRAY_ITEM(&clients, i);
                   if (c == NULL || c->session == NULL)
                           continue;
   
                   server_client_check_timers(c);
                   server_client_check_redraw(c);
   
                   server_client_handle_data(c);
           }
   
           /*
            * Any windows will have been redrawn as part of clients, so clear
            * their flags now.
            */
           for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
                   w = ARRAY_ITEM(&windows, i);
                   if (w == NULL)
                           continue;
   
                   w->flags &= ~WINDOW_REDRAW;
                   TAILQ_FOREACH(wp, &w->panes, entry)
                           wp->flags &= ~PANE_REDRAW;
           }
   }
   
   /* Handle data input or output from client. */
   void
 server_client_handle_data(struct client *c)  server_client_handle_data(struct client *c)
 {  {
         struct window           *w;          struct window           *w;
Line 336 
Line 370 
                 mode |= MODE_MOUSE;                  mode |= MODE_MOUSE;
         tty_update_mode(&c->tty, mode);          tty_update_mode(&c->tty, mode);
         tty_reset(&c->tty);          tty_reset(&c->tty);
 }  
   
 /* Client functions that need to happen every loop. */  
 void  
 server_client_loop(void)  
 {  
         struct client           *c;  
         struct window           *w;  
         struct window_pane      *wp;  
         u_int                    i;  
   
         for (i = 0; i < ARRAY_LENGTH(&clients); i++) {  
                 c = ARRAY_ITEM(&clients, i);  
                 if (c == NULL || c->session == NULL)  
                         continue;  
   
                 server_client_check_timers(c);  
                 server_client_check_redraw(c);  
         }  
   
         /*  
          * Any windows will have been redrawn as part of clients, so clear  
          * their flags now.  
          */  
         for (i = 0; i < ARRAY_LENGTH(&windows); i++) {  
                 w = ARRAY_ITEM(&windows, i);  
                 if (w == NULL)  
                         continue;  
   
                 w->flags &= ~WINDOW_REDRAW;  
                 TAILQ_FOREACH(wp, &w->panes, entry)  
                         wp->flags &= ~PANE_REDRAW;  
         }  
 }  }
   
 /* Check for client redraws. */  /* Check for client redraws. */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2