Add an option to alert (monitor) for silence (lack of activity) in a

window. From Thomas Adam.
This commit is contained in:
Nicholas Marriott
2010-12-06 22:51:02 +00:00
parent ebd0eb4fb4
commit e26a351865
9 changed files with 92 additions and 2 deletions

View File

@ -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 */