diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2010-12-06 22:51:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2010-12-06 22:51:02 +0000 |
commit | e26a351865a0d969b3f40ca3c14be7ff8d7533ad (patch) | |
tree | 4ac1f40063ffa767d37ecfe5019d2718635b502d /window.c | |
parent | ebd0eb4fb4790cbf289a0dace00e37fe866c9bf3 (diff) | |
download | rtmux-e26a351865a0d969b3f40ca3c14be7ff8d7533ad.tar.gz rtmux-e26a351865a0d969b3f40ca3c14be7ff8d7533ad.tar.bz2 rtmux-e26a351865a0d969b3f40ca3c14be7ff8d7533ad.zip |
Add an option to alert (monitor) for silence (lack of activity) in a
window. From Thomas Adam.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -639,6 +639,14 @@ window_pane_read_callback(unused struct bufferevent *bufev, void *data) input_parse(wp); wp->pipe_off = EVBUFFER_LENGTH(wp->event->input); + + /* + * If we get here, we're not outputting anymore, so set the silence + * flag on the window. + */ + wp->window->flags |= WINDOW_SILENCE; + if (gettimeofday(&wp->window->silence_timer, NULL) != 0) + fatal("gettimeofday failed."); } /* ARGSUSED */ |