summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authornicm <nicm>2015-04-22 15:30:11 +0000
committernicm <nicm>2015-04-22 15:30:11 +0000
commit8d66f4fba4972d45be64d108c7c8d952f85016a8 (patch)
treee4b4d2745922796fa06923b7d18e77b300daee59 /server-client.c
parent89e80cabd56bf2f7fa783575fe9b1f6192fade42 (diff)
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.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/server-client.c b/server-client.c
index c022a36f..e2f65e71 100644
--- a/server-client.c
+++ b/server-client.c
@@ -720,11 +720,7 @@ server_client_loop(void)
* Any windows will have been redrawn as part of clients, so clear
* their flags now. Also check pane focus and resize.
*/
- for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
- w = ARRAY_ITEM(&windows, i);
- if (w == NULL)
- continue;
-
+ RB_FOREACH(w, windows, &windows) {
w->flags &= ~WINDOW_REDRAW;
TAILQ_FOREACH(wp, &w->panes, entry) {
if (wp->fd != -1) {