summaryrefslogtreecommitdiffstats
path: root/resize.c
diff options
context:
space:
mode:
Diffstat (limited to 'resize.c')
-rw-r--r--resize.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/resize.c b/resize.c
index d398ab37..b5196c1c 100644
--- a/resize.c
+++ b/resize.c
@@ -50,7 +50,7 @@ recalculate_sizes(void)
struct window *w;
struct window_pane *wp;
u_int i, j, ssx, ssy, has, limit;
- int flag, has_status;
+ int flag, has_status, is_zoomed;
RB_FOREACH(s, sessions, &sessions) {
has_status = options_get_number(&s->options, "status");
@@ -123,12 +123,16 @@ recalculate_sizes(void)
if (w->sx == ssx && w->sy == ssy)
continue;
-
log_debug("window size %u,%u (was %u,%u)", ssx, ssy, w->sx,
w->sy);
+ is_zoomed = w->flags & WINDOW_ZOOMED;
+ if (is_zoomed)
+ window_unzoom(w);
layout_resize(w, ssx, ssy);
window_resize(w, ssx, ssy);
+ if (is_zoomed && window_pane_visible(w->active))
+ window_zoom(w->active);
/*
* If the current pane is now not visible, move to the next