aboutsummaryrefslogtreecommitdiff
path: root/layout-custom.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2019-07-29 10:51:30 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2019-07-29 10:51:30 +0100
commitda552eb73b80bab3c0a28dfb9ae2c75fa6d4bdaf (patch)
treecf9c86c3218659faf46e606a1e38bc6ebb570dcd /layout-custom.c
parent5a501a8ae27c2d0128870caa48c5708e97528567 (diff)
parentb90a9fcd13f4434aed0fe1785d619aa668bbc77d (diff)
downloadrtmux-da552eb73b80bab3c0a28dfb9ae2c75fa6d4bdaf.tar.gz
rtmux-da552eb73b80bab3c0a28dfb9ae2c75fa6d4bdaf.tar.bz2
rtmux-da552eb73b80bab3c0a28dfb9ae2c75fa6d4bdaf.zip
Merge branch 'master' into 3.0-rc
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);