mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-09 21:57:37 +02:00
Change the windows array into an RB tree and fix some places where we
were only looking at the first winlink for a window in a session.
This commit is contained in:
11
resize.c
11
resize.c
@ -49,7 +49,7 @@ recalculate_sizes(void)
|
||||
struct client *c;
|
||||
struct window *w;
|
||||
struct window_pane *wp;
|
||||
u_int i, j, ssx, ssy, has, limit;
|
||||
u_int i, ssx, ssy, has, limit;
|
||||
int flag, has_status, is_zoomed, forced;
|
||||
|
||||
RB_FOREACH(s, sessions, &sessions) {
|
||||
@ -57,8 +57,8 @@ recalculate_sizes(void)
|
||||
|
||||
s->attached = 0;
|
||||
ssx = ssy = UINT_MAX;
|
||||
for (j = 0; j < ARRAY_LENGTH(&clients); j++) {
|
||||
c = ARRAY_ITEM(&clients, j);
|
||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||
c = ARRAY_ITEM(&clients, i);
|
||||
if (c == NULL || c->flags & CLIENT_SUSPENDED)
|
||||
continue;
|
||||
if (c->session == s) {
|
||||
@ -92,9 +92,8 @@ recalculate_sizes(void)
|
||||
s->sy = ssy;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
|
||||
w = ARRAY_ITEM(&windows, i);
|
||||
if (w == NULL || w->active == NULL)
|
||||
RB_FOREACH(w, windows, &windows) {
|
||||
if (w->active == NULL)
|
||||
continue;
|
||||
flag = options_get_number(&w->options, "aggressive-resize");
|
||||
|
||||
|
Reference in New Issue
Block a user