aboutsummaryrefslogtreecommitdiff
path: root/layout-custom.c
diff options
context:
space:
mode:
Diffstat (limited to 'layout-custom.c')
-rw-r--r--layout-custom.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/layout-custom.c b/layout-custom.c
index 9886afe1..d759c206 100644
--- a/layout-custom.c
+++ b/layout-custom.c
@@ -122,7 +122,7 @@ layout_parse(struct window *w, const char *layout)
{
struct layout_cell *lc, *lcchild;
struct window_pane *wp;
- u_int npanes, ncells, sx, sy;
+ u_int npanes, ncells;
u_short csum;
/* Check validity. */
@@ -153,8 +153,7 @@ layout_parse(struct window *w, const char *layout)
layout_destroy_cell(w, lcchild, &lc);
}
- /* Save the old window size and resize to the layout size. */
- sx = w->sx; sy = w->sy;
+ /* Resize to the layout size. */
window_resize(w, lc->sx, lc->sy);
/* Destroy the old layout and swap to the new. */
@@ -166,12 +165,9 @@ layout_parse(struct window *w, const char *layout)
layout_assign(&wp, lc);
/* Update pane offsets and sizes. */
- layout_fix_offsets(lc);
+ layout_fix_offsets(w);
layout_fix_panes(w);
-
- /* Then resize the layout back to the original window size. */
- layout_resize(w, sx, sy);
- window_resize(w, sx, sy);
+ recalculate_sizes();
layout_print_cell(lc, __func__, 0);