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

Diff for /src/usr.bin/tmux/layout-set.c between version 1.22 and 1.23

version 1.22, 2019/04/04 10:25:35 version 1.23, 2019/04/17 14:43:49
Line 119 
Line 119 
 {  {
         struct window_pane      *wp;          struct window_pane      *wp;
         struct layout_cell      *lc, *lcnew;          struct layout_cell      *lc, *lcnew;
         u_int                    n;          u_int                    n, sx, sy;
   
         layout_print_cell(w->layout_root, __func__, 1);          layout_print_cell(w->layout_root, __func__, 1);
   
Line 131 
Line 131 
         /* Free the old root and construct a new. */          /* Free the old root and construct a new. */
         layout_free(w);          layout_free(w);
         lc = w->layout_root = layout_create_cell(NULL);          lc = w->layout_root = layout_create_cell(NULL);
         layout_set_size(lc, w->sx, w->sy, 0, 0);          if (type == LAYOUT_LEFTRIGHT) {
                   sx = (n * (PANE_MINIMUM + 1)) - 1;
                   if (sx < w->sx)
                           sx = w->sx;
                   sy = w->sy;
           } else {
                   sy = (n * (PANE_MINIMUM + 1)) - 1;
                   if (sy < w->sy)
                           sy = w->sy;
                   sx = w->sx;
           }
           layout_set_size(lc, sx, sy, 0, 0);
         layout_make_node(lc, type);          layout_make_node(lc, type);
   
         /* Build new leaf cells. */          /* Build new leaf cells. */
Line 152 
Line 163 
   
         layout_print_cell(w->layout_root, __func__, 1);          layout_print_cell(w->layout_root, __func__, 1);
   
           window_resize(w, lc->sx, lc->sy);
         notify_window("window-layout-changed", w);          notify_window("window-layout-changed", w);
         server_redraw_window(w);          server_redraw_window(w);
 }  }
Line 288 
Line 300 
   
         layout_print_cell(w->layout_root, __func__, 1);          layout_print_cell(w->layout_root, __func__, 1);
   
           window_resize(w, lc->sx, lc->sy);
         notify_window("window-layout-changed", w);          notify_window("window-layout-changed", w);
         server_redraw_window(w);          server_redraw_window(w);
 }  }
Line 412 
Line 425 
   
         layout_print_cell(w->layout_root, __func__, 1);          layout_print_cell(w->layout_root, __func__, 1);
   
           window_resize(w, lc->sx, lc->sy);
         notify_window("window-layout-changed", w);          notify_window("window-layout-changed", w);
         server_redraw_window(w);          server_redraw_window(w);
 }  }
Line 421 
Line 435 
 {  {
         struct window_pane      *wp;          struct window_pane      *wp;
         struct layout_cell      *lc, *lcrow, *lcchild;          struct layout_cell      *lc, *lcrow, *lcchild;
         u_int                    n, width, height, used;          u_int                    n, width, height, used, sx, sy;
         u_int                    i, j, columns, rows;          u_int                    i, j, columns, rows;
   
         layout_print_cell(w->layout_root, __func__, 1);          layout_print_cell(w->layout_root, __func__, 1);
Line 450 
Line 464 
         /* Free old tree and create a new root. */          /* Free old tree and create a new root. */
         layout_free(w);          layout_free(w);
         lc = w->layout_root = layout_create_cell(NULL);          lc = w->layout_root = layout_create_cell(NULL);
         layout_set_size(lc, w->sx, w->sy, 0, 0);          sx = ((width + 1) * columns) - 1;
           if (sx < w->sx)
                   sx = w->sx;
           sy = ((height + 1) * rows) - 1;
           if (sy < w->sy)
                   sy = w->sy;
           layout_set_size(lc, sx, sy, 0, 0);
         layout_make_node(lc, LAYOUT_TOPBOTTOM);          layout_make_node(lc, LAYOUT_TOPBOTTOM);
   
         /* Create a grid of the cells. */          /* Create a grid of the cells. */
Line 514 
Line 534 
   
         layout_print_cell(w->layout_root, __func__, 1);          layout_print_cell(w->layout_root, __func__, 1);
   
           window_resize(w, lc->sx, lc->sy);
         notify_window("window-layout-changed", w);          notify_window("window-layout-changed", w);
         server_redraw_window(w);          server_redraw_window(w);
 }  }

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23