aboutsummaryrefslogtreecommitdiff
path: root/resize.c
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-07-21 15:53:59 -0600
committerJosh Rahm <rahm@google.com>2022-07-21 15:53:59 -0600
commitb11548e3db4361cd8312ffbd27472823bdab4d62 (patch)
treea84b5cf79fb41bb60b6495c1a346bb360b224604 /resize.c
parent88ebf5544e995d85b2f1416a216ac7f44f719eed (diff)
parentab1d18d00febe161080b8e81331861481110809f (diff)
downloadrtmux-b11548e3db4361cd8312ffbd27472823bdab4d62.tar.gz
rtmux-b11548e3db4361cd8312ffbd27472823bdab4d62.tar.bz2
rtmux-b11548e3db4361cd8312ffbd27472823bdab4d62.zip
Merge remote-tracking branch 'origin/master' into rahm
Diffstat (limited to 'resize.c')
-rw-r--r--resize.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/resize.c b/resize.c
index 8416ad6a..457fee0a 100644
--- a/resize.c
+++ b/resize.c
@@ -61,6 +61,7 @@ resize_window(struct window *w, u_int sx, u_int sy, int xpixel, int ypixel)
tty_update_window_offset(w);
server_redraw_window(w);
notify_window("window-layout-changed", w);
+ notify_window("window-resized", w);
w->flags &= ~WINDOW_RESIZE;
}
@@ -178,7 +179,7 @@ clients_calculate_size(int type, int current, struct client *c,
cw = NULL;
/* Work out this client's size. */
- if (cw != NULL) {
+ if (cw != NULL && cw->sx != 0 && cw->sy != 0) {
cx = cw->sx;
cy = cw->sy;
} else {
@@ -348,6 +349,8 @@ recalculate_size_skip_client(struct client *loop, __unused int type,
* is not the current window - this is used for aggressive-resize.
* Otherwise skip any session that doesn't contain the window.
*/
+ if (loop->session->curw == NULL)
+ return (1);
if (current)
return (loop->session->curw->window != w);
return (session_has(loop->session, w) == 0);