diff options
author | nicm <nicm> | 2016-08-03 09:07:02 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-08-03 09:07:02 +0000 |
commit | f8cc48a43f1fd5fe082fde86b429c2cda5bcf1b0 (patch) | |
tree | 01924b8a29b0cf1ca69e6bfea1d85c789841d8db /layout-set.c | |
parent | 9436a316038d1d1c9bc161d282564ed67e2f8ce2 (diff) | |
download | rtmux-f8cc48a43f1fd5fe082fde86b429c2cda5bcf1b0.tar.gz rtmux-f8cc48a43f1fd5fe082fde86b429c2cda5bcf1b0.tar.bz2 rtmux-f8cc48a43f1fd5fe082fde86b429c2cda5bcf1b0.zip |
Fix minimum size when pane status line is enabled, reported by Y Petremann.
Diffstat (limited to 'layout-set.c')
-rw-r--r-- | layout-set.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/layout-set.c b/layout-set.c index bd1304ce..4d2b8ca7 100644 --- a/layout-set.c +++ b/layout-set.c @@ -155,7 +155,8 @@ layout_set_even_h(struct window *w) /* Allocate any remaining space. */ if (w->sx > xoff - 1) { lc = TAILQ_LAST(&lc->cells, layout_cells); - layout_resize_adjust(lc, LAYOUT_LEFTRIGHT, w->sx - (xoff - 1)); + layout_resize_adjust(w, lc, LAYOUT_LEFTRIGHT, + w->sx - (xoff - 1)); } /* Fix cell offsets. */ @@ -208,7 +209,8 @@ layout_set_even_v(struct window *w) /* Allocate any remaining space. */ if (w->sy > yoff - 1) { lc = TAILQ_LAST(&lc->cells, layout_cells); - layout_resize_adjust(lc, LAYOUT_TOPBOTTOM, w->sy - (yoff - 1)); + layout_resize_adjust(w, lc, LAYOUT_TOPBOTTOM, + w->sy - (yoff - 1)); } /* Fix cell offsets. */ @@ -322,14 +324,16 @@ layout_set_main_h(struct window *w) if (w->sx <= used) continue; lcchild = TAILQ_LAST(&lcrow->cells, layout_cells); - layout_resize_adjust(lcchild, LAYOUT_LEFTRIGHT, w->sx - used); + layout_resize_adjust(w, lcchild, LAYOUT_LEFTRIGHT, + w->sx - used); } /* Adjust the last row height to fit if necessary. */ used = mainheight + (rows * height) + rows - 1; if (w->sy > used) { lcrow = TAILQ_LAST(&lc->cells, layout_cells); - layout_resize_adjust(lcrow, LAYOUT_TOPBOTTOM, w->sy - used); + layout_resize_adjust(w, lcrow, LAYOUT_TOPBOTTOM, + w->sy - used); } /* Fix cell offsets. */ @@ -443,14 +447,16 @@ layout_set_main_v(struct window *w) if (w->sy <= used) continue; lcchild = TAILQ_LAST(&lccolumn->cells, layout_cells); - layout_resize_adjust(lcchild, LAYOUT_TOPBOTTOM, w->sy - used); + layout_resize_adjust(w, lcchild, LAYOUT_TOPBOTTOM, + w->sy - used); } /* Adjust the last column width to fit if necessary. */ used = mainwidth + (columns * width) + columns - 1; if (w->sx > used) { lccolumn = TAILQ_LAST(&lc->cells, layout_cells); - layout_resize_adjust(lccolumn, LAYOUT_LEFTRIGHT, w->sx - used); + layout_resize_adjust(w, lccolumn, LAYOUT_LEFTRIGHT, + w->sx - used); } /* Fix cell offsets. */ @@ -543,14 +549,16 @@ layout_set_tiled(struct window *w) if (w->sx <= used) continue; lcchild = TAILQ_LAST(&lcrow->cells, layout_cells); - layout_resize_adjust(lcchild, LAYOUT_LEFTRIGHT, w->sx - used); + layout_resize_adjust(w, lcchild, LAYOUT_LEFTRIGHT, + w->sx - used); } /* Adjust the last row height to fit if necessary. */ used = (rows * height) + rows - 1; if (w->sy > used) { lcrow = TAILQ_LAST(&lc->cells, layout_cells); - layout_resize_adjust(lcrow, LAYOUT_TOPBOTTOM, w->sy - used); + layout_resize_adjust(w, lcrow, LAYOUT_TOPBOTTOM, + w->sy - used); } /* Fix cell offsets. */ |