[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.92 and 1.93

version 1.92, 2013/03/24 09:25:04 version 1.93, 2013/03/24 09:28:59
Line 97 
Line 97 
         c->tty.mouse.event = MOUSE_EVENT_UP;          c->tty.mouse.event = MOUSE_EVENT_UP;
         c->tty.mouse.flags = 0;          c->tty.mouse.flags = 0;
   
           c->flags |= CLIENT_FOCUSED;
   
         evtimer_set(&c->repeat_timer, server_client_repeat_timer, c);          evtimer_set(&c->repeat_timer, server_client_repeat_timer, c);
   
         for (i = 0; i < ARRAY_LENGTH(&clients); i++) {          for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
Line 547 
Line 549 
 void  void
 server_client_check_focus(struct window_pane *wp)  server_client_check_focus(struct window_pane *wp)
 {  {
         struct session  *s;          u_int            i;
           struct client   *c;
   
         /* If we don't care about focus, forget it. */          /* If we don't care about focus, forget it. */
         if (!(wp->base.mode & MODE_FOCUSON))          if (!(wp->base.mode & MODE_FOCUSON))
Line 562 
Line 565 
                 goto not_focused;                  goto not_focused;
   
         /*          /*
          * If our window is the current window in any attached sessions, we're           * If our window is the current window in any focused clients with an
          * focused.           * attached session, we're focused.
          */           */
         RB_FOREACH(s, sessions, &sessions) {          for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                 if (s->flags & SESSION_UNATTACHED)                  c = ARRAY_ITEM(&clients, i);
                   if (c == NULL || c->session == NULL)
                         continue;                          continue;
                 if (s->curw->window == wp->window)  
                   if (!(c->flags & CLIENT_FOCUSED))
                           continue;
                   if (c->session->flags & SESSION_UNATTACHED)
                           continue;
   
                   if (c->session->curw->window == wp->window)
                         goto focused;                          goto focused;
         }          }
   

Legend:
Removed from v.1.92  
changed lines
  Added in v.1.93