diff options
author | nicm <nicm> | 2016-10-19 09:22:07 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-19 09:22:07 +0000 |
commit | 899e629bf0bc6053112cec5b65a63f1dd2330001 (patch) | |
tree | 7fb2b4739ce08ba6a6b894022dfb028585f259e5 /server-client.c | |
parent | bc27451e156c0a4af73d016ea04827710ea70d5b (diff) | |
download | rtmux-899e629bf0bc6053112cec5b65a63f1dd2330001.tar.gz rtmux-899e629bf0bc6053112cec5b65a63f1dd2330001.tar.bz2 rtmux-899e629bf0bc6053112cec5b65a63f1dd2330001.zip |
Alerts are too slow, so rather than walking all sessions and windows,
add a link of winlinks to each window and a pointer to the session to
each winlink. Also rewrite the alerts processing to return to the old
behaviour (alert in any window sets the flag on any winlink).
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server-client.c b/server-client.c index 98a28738..b92bada5 100644 --- a/server-client.c +++ b/server-client.c @@ -853,6 +853,7 @@ server_client_loop(void) struct client *c; struct window *w; struct window_pane *wp; + int focus; TAILQ_FOREACH(c, &clients, entry) { server_client_check_exit(c); @@ -866,11 +867,13 @@ 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. */ + focus = options_get_number(global_options, "focus-events"); RB_FOREACH(w, windows, &windows) { w->flags &= ~WINDOW_REDRAW; TAILQ_FOREACH(wp, &w->panes, entry) { if (wp->fd != -1) { - server_client_check_focus(wp); + if (focus) + server_client_check_focus(wp); server_client_check_resize(wp); } wp->flags &= ~PANE_REDRAW; @@ -937,10 +940,6 @@ server_client_check_focus(struct window_pane *wp) struct client *c; int push; - /* Are focus events off? */ - if (!options_get_number(global_options, "focus-events")) - return; - /* Do we need to push the focus state? */ push = wp->flags & PANE_FOCUSPUSH; wp->flags &= ~PANE_FOCUSPUSH; |