diff options
author | nicm <nicm> | 2014-04-17 07:36:45 +0000 |
---|---|---|
committer | nicm <nicm> | 2014-04-17 07:36:45 +0000 |
commit | 992ef70fb696d648b3ec6ed97642fd79a8392baf (patch) | |
tree | b37b31dd9241614b8cb558f614163e69b3403f90 /server-window.c | |
parent | 5acee1c04ed38afd6a32da4a66e6855ccdc52af3 (diff) | |
download | rtmux-992ef70fb696d648b3ec6ed97642fd79a8392baf.tar.gz rtmux-992ef70fb696d648b3ec6ed97642fd79a8392baf.tar.bz2 rtmux-992ef70fb696d648b3ec6ed97642fd79a8392baf.zip |
Remove the monitor-content option and associated bits and bobs. It's
never worked very well. If there is a big demand for it to return, will
consider better ways to do it.
Diffstat (limited to 'server-window.c')
-rw-r--r-- | server-window.c | 55 |
1 files changed, 4 insertions, 51 deletions
diff --git a/server-window.c b/server-window.c index 86beeef4..a14c3150 100644 --- a/server-window.c +++ b/server-window.c @@ -27,19 +27,16 @@ int server_window_check_bell(struct session *, struct winlink *); int server_window_check_activity(struct session *, struct winlink *); int server_window_check_silence(struct session *, struct winlink *); -int server_window_check_content( - struct session *, struct winlink *, struct window_pane *); void ring_bell(struct session *); /* Window functions that need to happen every loop. */ void server_window_loop(void) { - struct window *w; - struct winlink *wl; - struct window_pane *wp; - struct session *s; - u_int i; + struct window *w; + struct winlink *wl; + struct session *s; + u_int i; for (i = 0; i < ARRAY_LENGTH(&windows); i++) { w = ARRAY_ITEM(&windows, i); @@ -55,8 +52,6 @@ server_window_loop(void) server_window_check_activity(s, wl) || server_window_check_silence(s, wl)) server_status_session(s); - TAILQ_FOREACH(wp, &w->panes, entry) - server_window_check_content(s, wl, wp); } } } @@ -187,48 +182,6 @@ server_window_check_silence(struct session *s, struct winlink *wl) return (1); } -/* Check for content change in window. */ -int -server_window_check_content( - struct session *s, struct winlink *wl, struct window_pane *wp) -{ - struct client *c; - struct window *w = wl->window; - u_int i; - char *found, *ptr; - - /* Activity flag must be set for new content. */ - if (s->curw->window == w) - w->flags &= ~WINDOW_ACTIVITY; - - if (!(w->flags & WINDOW_ACTIVITY) || wl->flags & WINLINK_CONTENT) - return (0); - if (s->curw == wl && !(s->flags & SESSION_UNATTACHED)) - return (0); - - ptr = options_get_string(&w->options, "monitor-content"); - if (ptr == NULL || *ptr == '\0') - return (0); - if ((found = window_pane_search(wp, ptr, NULL)) == NULL) - return (0); - free(found); - - if (options_get_number(&s->options, "bell-on-alert")) - ring_bell(s); - wl->flags |= WINLINK_CONTENT; - - if (options_get_number(&s->options, "visual-content")) { - for (i = 0; i < ARRAY_LENGTH(&clients); i++) { - c = ARRAY_ITEM(&clients, i); - if (c == NULL || c->session != s) - continue; - status_message_set(c, "Content in window %u", wl->idx); - } - } - - return (1); -} - /* Ring terminal bell. */ void ring_bell(struct session *s) |