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

Diff for /src/usr.bin/tmux/resize.c between version 1.28 and 1.29

version 1.28, 2019/03/04 09:29:52 version 1.29, 2019/03/12 13:56:30
Line 61 
Line 61 
         notify_window("window-layout-changed", w);          notify_window("window-layout-changed", w);
 }  }
   
   static int
   ignore_client_size(struct client *c)
   {
           if (c->session == NULL)
                   return (1);
           if (c->flags & CLIENT_NOSIZEFLAGS)
                   return (1);
           if ((c->flags & CLIENT_CONTROL) && (~c->flags & CLIENT_SIZECHANGED))
                   return (1);
           return (0);
   }
   
 void  void
 default_window_size(struct session *s, struct window *w, u_int *sx, u_int *sy,  default_window_size(struct session *s, struct window *w, u_int *sx, u_int *sy,
     int type)      int type)
Line 77 
Line 89 
         if (type == WINDOW_SIZE_LARGEST) {          if (type == WINDOW_SIZE_LARGEST) {
                 *sx = *sy = 0;                  *sx = *sy = 0;
                 TAILQ_FOREACH(c, &clients, entry) {                  TAILQ_FOREACH(c, &clients, entry) {
                         if (c->session == NULL)                          if (ignore_client_size(c))
                                 continue;                                  continue;
                         if (c->flags & CLIENT_NOSIZEFLAGS)  
                                 continue;  
                         if (w != NULL && !session_has(c->session, w))                          if (w != NULL && !session_has(c->session, w))
                                 continue;                                  continue;
                         if (w == NULL && c->session != s)                          if (w == NULL && c->session != s)
Line 99 
Line 109 
         } else {          } else {
                 *sx = *sy = UINT_MAX;                  *sx = *sy = UINT_MAX;
                 TAILQ_FOREACH(c, &clients, entry) {                  TAILQ_FOREACH(c, &clients, entry) {
                         if (c->session == NULL)                          if (ignore_client_size(c))
                                 continue;                                  continue;
                         if (c->flags & CLIENT_NOSIZEFLAGS)  
                                 continue;  
                         if (w != NULL && !session_has(c->session, w))                          if (w != NULL && !session_has(c->session, w))
                                 continue;                                  continue;
                         if (w == NULL && c->session != s)                          if (w == NULL && c->session != s)
Line 146 
Line 154 
         struct client   *c;          struct client   *c;
         struct window   *w;          struct window   *w;
         u_int            sx, sy, cx, cy;          u_int            sx, sy, cx, cy;
         int              flags, type, current, has, changed;          int              type, current, has, changed;
   
         /*          /*
          * Clear attached count and update saved status line information for           * Clear attached count and update saved status line information for
Line 162 
Line 170 
          * client.           * client.
          */           */
         TAILQ_FOREACH(c, &clients, entry) {          TAILQ_FOREACH(c, &clients, entry) {
                 if ((s = c->session) == NULL)                  if (ignore_client_size(c))
                         continue;                          continue;
   
                 flags = c->flags;  
                 if (flags & CLIENT_SUSPENDED)  
                         continue;  
                 if ((flags & CLIENT_CONTROL) && (~flags & CLIENT_SIZECHANGED))  
                         continue;  
   
                 if (c->tty.sy <= status_line_size(c))                  if (c->tty.sy <= status_line_size(c))
                         c->flags |= CLIENT_STATUSOFF;                          c->flags |= CLIENT_STATUSOFF;
                 else                  else
                         c->flags &= ~CLIENT_STATUSOFF;                          c->flags &= ~CLIENT_STATUSOFF;
                   c->session->attached++;
                 s->attached++;  
         }          }
   
         /* Walk each window and adjust the size. */          /* Walk each window and adjust the size. */
Line 194 
Line 194 
                 if (type == WINDOW_SIZE_LARGEST) {                  if (type == WINDOW_SIZE_LARGEST) {
                         sx = sy = 0;                          sx = sy = 0;
                         TAILQ_FOREACH(c, &clients, entry) {                          TAILQ_FOREACH(c, &clients, entry) {
                                 if ((s = c->session) == NULL)                                  if (ignore_client_size(c))
                                         continue;                                          continue;
                                   s = c->session;
   
                                 if (current)                                  if (current)
                                         has = (s->curw->window == w);                                          has = (s->curw->window == w);
                                 else                                  else
Line 216 
Line 218 
                 } else {                  } else {
                         sx = sy = UINT_MAX;                          sx = sy = UINT_MAX;
                         TAILQ_FOREACH(c, &clients, entry) {                          TAILQ_FOREACH(c, &clients, entry) {
                                 if ((s = c->session) == NULL)                                  if (ignore_client_size(c))
                                         continue;                                          continue;
                                   s = c->session;
   
                                 if (current)                                  if (current)
                                         has = (s->curw->window == w);                                          has = (s->curw->window == w);
                                 else                                  else

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29