diff options
author | nicm <nicm> | 2020-05-16 16:50:55 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-16 16:50:55 +0000 |
commit | 574a9e4b6c7a419b60668c30916327aa7e65d2c8 (patch) | |
tree | 5e50994e1f05a0588160290c09662b1e0864f695 /window.c | |
parent | 844b363baf64fbaff91cf8fa01d4fd782e7274a8 (diff) | |
download | rtmux-574a9e4b6c7a419b60668c30916327aa7e65d2c8.tar.gz rtmux-574a9e4b6c7a419b60668c30916327aa7e65d2c8.tar.bz2 rtmux-574a9e4b6c7a419b60668c30916327aa7e65d2c8.zip |
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.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -440,13 +440,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) @@ -991,7 +993,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); } @@ -1135,8 +1136,10 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s, wme = TAILQ_FIRST(&wp->modes); if (wme != NULL) { - if (wme->mode->key != NULL && c != NULL) - wme->mode->key(wme, c, s, wl, (key & ~KEYC_XTERM), m); + if (wme->mode->key != NULL && c != NULL) { + key &= ~KEYC_MASK_FLAGS; + wme->mode->key(wme, c, s, wl, key, m); + } return (0); } |