diff options
author | nicm <nicm> | 2020-06-05 07:33:57 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-06-05 07:33:57 +0000 |
commit | c586208991e4291450757e3a19739f368aecbe5d (patch) | |
tree | 1fd2a4d7c912879f02e1b43367825670e0538800 /resize.c | |
parent | d9cd493d093f14b934343a2e57998c86fbca2ef7 (diff) | |
download | rtmux-c586208991e4291450757e3a19739f368aecbe5d.tar.gz rtmux-c586208991e4291450757e3a19739f368aecbe5d.tar.bz2 rtmux-c586208991e4291450757e3a19739f368aecbe5d.zip |
Add support for pausing a pane when the output buffered for a control
mode client gets too far behind. The pause-after flag with a time is set
on the pane with refresh-client -f and a paused pane may be resumed with
refresh-client -A. GitHub issue 2217.
Diffstat (limited to 'resize.c')
-rw-r--r-- | resize.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -227,7 +227,7 @@ done: } void -recalculate_size(struct window *w) +recalculate_size(struct window *w, int now) { struct session *s; struct client *c; @@ -348,10 +348,10 @@ recalculate_size(struct window *w) break; } if (w->flags & WINDOW_RESIZE) { - if (changed && w->new_sx == sx && w->new_sy == sy) + if (!now && changed && w->new_sx == sx && w->new_sy == sy) changed = 0; } else { - if (changed && w->sx == sx && w->sy == sy) + if (!now && changed && w->sx == sx && w->sy == sy) changed = 0; } @@ -360,7 +360,7 @@ recalculate_size(struct window *w) return; } log_debug("%s: @%u new size %u,%u", __func__, w->id, sx, sy); - if (type == WINDOW_SIZE_MANUAL) + if (now || type == WINDOW_SIZE_MANUAL) resize_window(w, sx, sy, xpixel, ypixel); else { w->new_sx = sx; @@ -376,6 +376,12 @@ recalculate_size(struct window *w) void recalculate_sizes(void) { + recalculate_sizes_now(0); +} + +void +recalculate_sizes_now(int now) +{ struct session *s; struct client *c; struct window *w; @@ -407,5 +413,5 @@ recalculate_sizes(void) /* Walk each window and adjust the size. */ RB_FOREACH(w, windows, &windows) - recalculate_size(w); + recalculate_size(w, now); } |