From 57fe03dc5a132ee131de457afa5724ec735ae811 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 16 May 2020 14:57:36 +0100 Subject: Move lazy resize from the pane to the window, there is no point in resizing the window unless it is the current window, and if we do and don't resize the pane until later there are problems if the size changes from A to B then back to A. --- window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'window.c') diff --git a/window.c b/window.c index 7cb098dd..b35ab8ab 100644 --- a/window.c +++ b/window.c @@ -438,13 +438,15 @@ window_pane_send_resize(struct window_pane *wp, int yadjust) { struct window *w = wp->window; struct winsize ws; + u_int sy = wp->sy + yadjust; if (wp->fd == -1) return; + log_debug("%s: %%%u resize to %u,%u", __func__, wp->id, wp->sx, sy); memset(&ws, 0, sizeof ws); ws.ws_col = wp->sx; - ws.ws_row = wp->sy + yadjust; + ws.ws_row = sy; ws.ws_xpixel = w->xpixel * ws.ws_col; ws.ws_ypixel = w->ypixel * ws.ws_row; if (ioctl(wp->fd, TIOCSWINSZ, &ws) == -1) @@ -1001,7 +1003,6 @@ window_pane_resize(struct window_pane *wp, u_int sx, u_int sy) wme = TAILQ_FIRST(&wp->modes); if (wme != NULL && wme->mode->resize != NULL) wme->mode->resize(wme, sx, sy); - wp->flags |= (PANE_RESIZE|PANE_RESIZED); } -- cgit