mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Add an option to alert (monitor) for silence (lack of activity) in a
window. From Thomas Adam.
This commit is contained in:
		
							
								
								
									
										10
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								window.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: window.c,v 1.141 2010-12-06 21:53:50 nicm Exp $ */
 | 
			
		||||
/* $Id: window.c,v 1.142 2010-12-06 22:52:21 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -636,6 +636,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 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user