diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-04-09 20:38:43 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-04-09 20:38:43 +0100 |
commit | 0cbccc90ab323158aecb961b93954878693c1c90 (patch) | |
tree | f03387ecec5e84fcfe222595c0dafb0a7243b472 /layout.c | |
parent | 71d90c11dd0a90a4defd3d56843dfcb1170310f5 (diff) | |
download | rtmux-0cbccc90ab323158aecb961b93954878693c1c90.tar.gz rtmux-0cbccc90ab323158aecb961b93954878693c1c90.tar.bz2 rtmux-0cbccc90ab323158aecb961b93954878693c1c90.zip |
Set the window size as well as the layout size when using the preset layouts
and calculate the sizes correctly.
Diffstat (limited to 'layout.c')
-rw-r--r-- | layout.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -479,7 +479,7 @@ layout_resize(struct window *w, u_int sx, u_int sy) * out proportionately - this should leave the layout fitting the new * window size. */ - xchange = sx - w->sx; + xchange = sx - lc->sx; xlimit = layout_resize_check(w, lc, LAYOUT_LEFTRIGHT); if (xchange < 0 && xchange < -xlimit) xchange = -xlimit; @@ -493,7 +493,7 @@ layout_resize(struct window *w, u_int sx, u_int sy) layout_resize_adjust(w, lc, LAYOUT_LEFTRIGHT, xchange); /* Adjust vertically in a similar fashion. */ - ychange = sy - w->sy; + ychange = sy - lc->sy; ylimit = layout_resize_check(w, lc, LAYOUT_TOPBOTTOM); if (ychange < 0 && ychange < -ylimit) ychange = -ylimit; |